01 Getting Started

We will discuss the lookup input element in this lesson, including:
  • How to use conditions where users can insert search text to display results. 
  • How do you query lookup fields based on fields or variables in the project?
  • Displaying additional fields in the lookup modal. 
  • Toggling auto-suggestions. 
  • Using the lookup element as a filter for power tables.

02 Project Setup

In this lesson, we have a project as follows:

A lookup field will display the accounts linked to a specific SLA. Typing a letter or letters in the search field will show results that contain that letter or sequence of letters. Clicking the search icon opens the lookup modal with all the possible accounts.

preview of project set up

The Debug Mode is on.

project settings > tools tab > debug mode enabled

03 Configure the Lookup

1. Select the lookup element and click the Gear icon to open the Settings screen.

2. Click the Configure Lookup button.

look up settings menu > content tab

3. Use the drop-down list to select the Salesforce object. In this lesson, we chose Account.

4. Click the Next button.

look up configuration > select source

5. Configure the conditions. The first field is added by default:
  • Account Name Contains Field FormField/Lookup field. This will allow the end user to put in some values that will filter down to the accounts that contain that search value.
  • SLA Equals Field SLA/Value
6. Click the Next button.

look up configuration > conditions step

7. Configure the additional mapping as follows. These extra fields will be displayed on the modal:
  • Column 1 Industry = Industry
  • Column 2 SLA = SLA
Note that the Value is the ID of the selected record. This Value can be used in different places in the project.

8. Click the Apply button.

lookup configuration > mapping step

9. Save and preview the project.

10. Use the drop-down list to select an SLA.

11. Click the lookup icon to open the modal with the results.

preview mode showing the look up modal

12. Select an option and click the Apply button.

13. Click the Debug button. Although the account name is displayed in the lookup field, the account ID is shown on the Debug Project screen. This Value can be used to run Gets or be pushed to Salesforce.

preview mode displaying debug window

04 Disable Autosuggest

When the user types a search term, suggestions are automatically shown.

preview mode showing auto suggest

1. Select the lookup element and click the Gear icon to open the Settings screen.

2. Under Interactivity, scroll down and deselect the Auto Suggest checkbox. This option is on by default.

look up settings > interactivity > auto suggest

3. Save and preview the project. You will see no suggestions when a search term is entered.

You can still search using the lookup modal.

lookup modal

05 Using Lookup Value as a Condition for a Different Element

1. Add a power table to the project.

2. Use the drop-down list to select the Salesforce object. In this lesson, we chose Contact.

salesforce configuration > select source

3. Configure the condition:
  • Account ID Equals Field Accounts/Value
4. Click the Next button.

Salesforce configuration > condition

5. Add extra columns and configure the mapping:
  • First Name
  • Last Name
  • Account ID = Field Account Name (This is to demonstrate in this lesson that the correct values are returned.)
6. Click the Apply button.

salesforce configuration > mapping

7. Click the Apply button on the Salesforce Configuration screen.

The power table is added to the canvas.

power table added to canvas

06 Replace Auto Created Trigger with Custom One

The automatic Get will be turned off, and we will configure a condition to trigger the information to the power table.

1. Open the Pages drop-down list and click the Kebab icon next to the Home page.

2. Click the Configure Actions button.

pages drop-down > page kebab > submenu
3. Select the Every Time option and delete the Salesforce Action.

4. Click the Apply button.

configure actions > every time tab

5. Select the power table and click the Gear icon to open the Settings screen.

6. Under Conditions, click the Configure Conditions button.

power table settings > conditions tab

7. Double-click the Conditions node.

set conditions window

8. Configure the conditions as follows:
  • Power Table/Value is not empty
  • Power Table/Value Changed
9. Click the Next button.

edit node window

10. Add a tag and click the Save button.

11. Click the + icon next to the Condition node.

set conditions window

12. Select the Salesforce Action option and click the Next button.

add node > salesforce action

13. Use the drop-down list to select the Contact Get and click the Next button.

14. Add a tag and click the Insert button.

set conditions window > action flow

15. Click the Apply button.

16. Save and preview the project.

17. Use the drop-down list to select the Gold SLA. The power table is empty as the Get hasn’t been triggered yet.

preview mode displaying how the look up affects the power table

18. Click the search icon and search for an account on the modal.

19. Select the account and click the Apply button.

lookup modal

You will see the contacts linked to the account.

preview of look up affecting power table

07 Other Interactivity Options

You can allow users to add new records.

1. Select the lookup element and click the Gear icon to open the Settings screen.

2. Under Interactivity, scroll down and select the All Add Record checkbox.

look up settings > interactivity tab > allow add record

For more information on the other options, click the i icon.

08 Got Feedback?

Additional Resources