Basic lookups

Here are some easy yet effective ways to enhance your forms with the Lookup field!

Populate choices based on entries from other forms

When you need to use the same list of choices on multiple forms, the Lookup field can help you manage those choices from a single form. For example, let’s say our coffee shop (Cognito Coffee) has locations in multiple states. Using the Lookup field, we can create a list of locations, then reference that same list on various forms (customer surveys, order forms, etc.). Here’s how it works:

  1. Create your locations form (ex: Cognito Coffee Locations).

  2. Populate the form entries with the specific details for each location:
    chrome_RfttmYhlLn.png

  3. Next, create a form that references the list of locations (ex: Cognito Coffee Customer Survey)

  4. In the builder, click into an empty placeholder to add a new field. Select Lookup from the Add Field menu.

  5. In the Lookup field settings, find the Lookup Choices From option and select the Locations form. By default, the Choice Label option should populate with the first text field from the Locations form – in this case, the Location field.

  6. Save and open up your form. The Lookup field (‘Location’) will provide customers with a list of locations based on the entries from the Locations form. Best of all, this list will update automatically as we add, remove, or update locations!

Write calculations that use data from lookup entries

Quick Tip
To reference a value from a Lookup field, first enter the name of the Lookup field, followed by a period (.), and then the name of the field on the form you are looking up (ex: LookupField.Name.First).

All data from the Lookup field is available for use in calculations. For example, if we have a bulk coffee order form, we may need to calculate prices based on bean type and price fluctuations from the supplier. Instead of updating all the prices in our inventory, we can simply reference the price in a calculation, and adjust the calculation accordingly.

  1. Create an inventory form (ex: Cognito Coffee Store Inventory).

  2. Populate the form entries with any necessary details about your suppliers, including country of origin, number of pounds, cost per pound, etc.
    chrome_6opUaYWWAR.png

  3. Create an order form that references the inventory form (ex: Cognito Coffee Bulk Coffee Order).

  4. In the builder, click into an empty placeholder to add a new field. Select Lookup from the Add Field menu.

  5. In the Lookup field settings, find the Lookup Choices From option and select the Inventory form. By default, the Choice Label option should populate with the first text field from the source form – in this case, the Origin field.

  6. Add a Calculation field to your form labelled ‘Price Per Pound’. Here, you can reference the ‘Cost per Pound’ field from the Inventory form in your calculation: =LookupField.CostPerPound*2.5

  7. Save and open up your form. The ‘Price Per Pound’ field will calculate the total price per pound using the prices from your inventory.

Look up email addresses to route email notifications

Lookup fields provide an easy way to manage email routing and effectively control who gets notified when a new form is submitted. For example, let’s take a look at the Cognito Coffee Customer Survey form. When a customer submits their survey, we want to route an email notification to the manager of their store location. To begin:

  1. Create a locations form (ex: Cognito Coffee Locations).

  2. Populate the form entries with the specific details for each location (including manager name and email):
    chrome_RfttmYhlLn.png

  3. Create a survey form (ex: Cognito Coffee Customer Survey)

  4. In the builder, click into an empty placeholder to add a new field. Select Lookup from the Add Field menu.

  5. In the Lookup field settings, find the Lookup Choices From option and select the Inventory form. By default, the Choice Label option should populate with the first text field from the source form – in this case, the ‘Store Location’ field.

  6. Open the Action Settings for the Submit action, then add or edit an email notification.

  7. Set the store manager email field as the ‘To’ value, then complete the rest of the email notification settings.

  8. Click Save. Now your email notification will automatically be routed to the manager of the selected store location.
    chrome_ZaWKZwce8T.png