Learning Objectives

After completing this tutorial, you’ll be able to:

  • Add Formula Fields to Youreka Templates
  • Update Formula Fields directly from a Youreka Form

Prerequisites: Building Your First Form Template, Field Links

Time Required: 10 minutes

Youreka supports Salesforce formula field types. Depending on your use case of the formula in Salesforce, you may want to leverage Youreka to perform calculations or determine when certain actions should occur in Salesforce like workflow triggers or validation rules.

To keep things simple in this tutorial, we will use a formula that combines the field linked First Name and Last Name fields to create the Full Name field. This Full Name field is a custom formula field on the Contact Object in Salesforce, and by adding this field as a question type in Youreka, we will be able to update this field directly from the form.

Add the Custom Full Name Formula to the Contact Object

Don’t have this formula field on your Contact Object? Add it by following these steps:


  1. Navigate to Setup > Customize > Contacts > Fields
  2. In the Custom Fields & Relationships section, click New
  3. Select Formula as the data type and click Next
  4. Name the field Full Name
  5. Select Text as the formula return type and click Next
  6. Copy and paste this formula in the text box:
    FirstName + ' ' + LastName
  7. Check syntax to confirm no errors exist
  8. Click Next to add any description text, establish Field Level Security, and Save your new formula field



Add the Full Name Formula to your Youreka Template 

In the Field Links tutorial, we added a number of questions to the Store Contact Information section, including the First and Last name of the store manager. With our Formula Field, we can add a question that will leverage this custom field so that the full name of the store manager will be visible and we can automatically update that field from a form.


  1. Navigate to your Arabica Coffee Store Visit Template and delete any previously created forms so that you can edit the template  in the Template Builder. The Store Contact Information section should resemble this:
    Store Contact Information Section.jpg
  2. Drag and drop a new question into the section in the right-hand column, between Store Manager Last Name and Preferred Contact Method.
  3. In the Edit Question modal, make the following edits:
    • Question Text = Full Name 
    • Type = Field Link
    • Field Link Lookup = disco__Form_Contact__c
    • Field Link Field = Full Name
      Formula 4.jpg
  4. Save the Question. The new section should look like this with the Full Name question included.
    Formula 7.jpg
  5. You cannot test formula fields in Preview mode from the template builder. To test the new formula field, save your form template, publish it, and create a new form.
  6. Link your template to a test Account and Contact in Salesforce. Notice that your Field Linked fields have been prepopulated, including the new Formula Field.

    Formula 1.jpg

  7. To test the Formula functionality, alter the test contact’s first name and click the blue arrow to activate the formula. You should see the changes appear instantly within the form.

    Formula 2.jpg



Leverage other Salesforce Formula Fields

Looking to leverage more Formula Fields in Salesforce? Here is a list of Useful Formula Fields that Salesforce has documented that you could implement in your own organization. You can then add these formula fields to Youreka templates to be updated directly from your forms.