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 and then reference that same list on various forms (customer satisfaction surveys, sales forms, etc.). Here’s how it works:
Create your locations form (ex: Cognito Coffee Locations).
Populate the form entries with the specific details for each location:
Next, create a form that references the list of locations (ex: Cognito Coffee Customer Survey)
In the builder, click into an empty placeholder to add a new field. Select Lookup from the Add Field menu.
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.
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
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.
Create an inventory form (ex: Cognito Coffee Store Inventory).
Populate the form entries with any necessary details about your suppliers, including country of origin, number of pounds, cost per pound, etc.
Create an order form that references the inventory form (ex: Cognito Coffee Bulk Coffee Order).
In the builder, click into an empty placeholder to add a new field. Select Lookup from the Add Field menu.
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.
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
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:
Create a locations form (ex: Cognito Coffee Locations).
Populate the form entries with the specific details for each location (including manager name and email):
Create a survey form (ex: Cognito Coffee Customer Survey)
In the builder, click into an empty placeholder to add a new field. Select Lookup from the Add Field menu.
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.
Open the Action Settings for the Submit action, then add or edit an email notification.
For the ‘To’ value, use the Insert Field dropdown to select the store manager email field. Then, complete the rest of the email notification settings.
Click Save. Now your email notification will automatically be routed to the manager of the selected store location.