Configuring a "Lookup" Field
Configuring a "Lookup" field, you can retrieve and copy data from a different app.
For example, you can configure a "Lookup" field in the "Order management" app in such a way that the field references data in the "Product management" app. This enables you to retrieve product information from the "Product management" app and copy the information in the "Order management" app. This reduces the effort required for entering the same data twice and prevents typing errors.
Reference: What Is Lookup?
Basic Steps to Use a Lookup
Create an app to be used as a data source (reference source).
Place some fields in the app. There is no need to register data at this point.
Open the app settings screen of the app that will retrieve data and place a "Lookup" field.
Open the setting screen of the "Lookup" field you have placed and configure the following setting options:
- Name (Required)
- The "Required field" check box
- Datasource App (Required)
- Key Field (Required)
A field that plays a role of the key for associating apps. You can specify one of the following types of fields:
- Text, Number, Calculated, Lookup, Link, or Record number
- Field Mappings
- Fields Shown in Lookup Picker
- Initial filter setting
- Initial sort setting
- Field Code (Required)
Once you save the form, you cannot change the setting for Datasource App and Key Field.
Other setting options can be changed afterwards.
For details on each setting option, refer to Setting Options for Lookup Fields.
On the "Lookup Settings" screen, click Save.
Click Save Form and then click Update App (or Activate App) at the upper right of the app settings screen.
You have successfully configured a "Lookup" field.
Try your lookup.
Open the "New Record" screen of the app in which you have configured the "Lookup" field in steps 2 and 3 and click Lookup.
When you enter a keyword and click Lookup, you can narrow down the records to only those that match the keyword.
Reference: Using Lookup
Example of Lookup Settings
This section uses actual apps to describe the steps to configure a lookup. In this example, the "Order management" app and "Product management" app are used.
Register data to the reference source app
To retrieve data of the "Product management" app (the reference source app) in the "Order management" app, you must register data that serves as a source in the "Product management" app beforehand.
In this example, data such as product code, product name, and unit price is registered beforehand.
Configure a "Lookup" field
Next, place a "Lookup" field in the "Order management" app, which will retrieve data from the other app.
Open the "Order management" app, click the app settings button at the upper right of the "View" screen, and select the Form tab.
Place a table on the form.
Drag and drop a "Lookup" field on the table.
In this example, you will configure a "Lookup" field that retrieves information based on product codes.
Add also the fields used for displaying data retrieved from the "Product management" app to the table.
In this example, add the following fields:
- Product Name: "Text" field
- Unit Price: "Number" field
- Quantity: "Number" field
- Subtotal: "Calculated" field
Hover the mouse cursor over the "Lookup" field and click the setting button to open the settings screen.
Configure the following settings.
- Set Name.
In this example, enter "Product Code".
- Set Datasource App.
Select an app from which you want to copy data. In this example, select "Product management app."
- Set Key Field.
Select a field that will work as a key for finding a corresponding record. In this example, select the "Product code" field.
For Key Field, you can specify any of the following fields:
- Text, Number, Calculated, Lookup, Link, and Record number
- Set Name.
Select fields for Field Mappings.
The data of multiple fields can be retrieved from the records in the reference source app at once.
In this example, add the following pairs: "Product name" < "[Product management]Product name" and "Unit price" < "[Product management]Unit price."
You can click the plus button (+) to add as many rows as necessary based on how many fields you want to copy.
If necessary, select fields for Fields Shown in Lookup Picker.
Fields specified here are displayed on the screen to select which record you want to retrieve data from. These fields help you identify the correct record when there are multiple records with the same product code.
In this example, select "Product name" and "Unit price." For details, refer to Using Lookup.
If necessary, also configure the following:
Specify Initial filter setting.
This filter setting will be applied to help users select a record appropriately. From the dropdown, select a field to which the condition is to be applied, and then specify the filter condition. In this example, you will not configure the initial filter setting since you want all records to be displayed.
Even if you have configured the initial filter setting, it is not applied when only one record matches the keyword entered into the "Lookup" field. In such a case, the information in the record is retrieved directly without the filter being applied.
Specify Initial sort setting.
Specify the display order of records to be retrieved. In this example, select "Product code" and Ascending.
Click Save on the settings screen of the "Lookup" field.
Click Table Settings under the table setting button on the upper right of the table to specify a table name.
Enter a table name and click Save.
In this example, enter "Product information".
Click Update App (or Activate App) at the upper right of the screen.
You have successfully configured a "Lookup" field.
For details on how to use a lookup, refer to Using Lookup.
Additional Example of Lookup Settings
Specifying Field Mappings in the Lookup settings, you can retrieve data of various fields, such as "Multi-choice" fields, "Check box" fields, and "Drop-down" fields.
This section explains how to copy the following data registered in the "Customer Database" app and add it in the "Lead Management" app.
- Product Name (A "Multi-choice" field)
- Options (A "Check box" field)
Since company names are registered in both the "Customer Database" app and the "Lead Management" app, you will use company names to retrieve data for products and options.
In the "Lead Management" app, place a "Lookup" field, in which you will enter a company name to lookup data, and configure the field as described below:
|Datasource App||Key Field|
|Field Mappings (Fields to which data is copied)||Field Mappings (Fields from which data is copied)|
|Product Name||[Customer Database] Product Name|
|Options||[Customer Database] Options|
Now, by entering a company name in the "Lead Management" app and clicking Lookup, you can retrieve product names and options from the "Customer Database" app.
Notes on Lookups
Even if changes are made to the records that are referred to (the records in the reference source app), values that are already retrieved in the "Lookup" field remain unchanged. The values are not automatically updated.
Users need to click Lookup again to overwrite existing data with the latest data.
You can bulk update existing records by importing a CSV file.
However, the field values entered using the Lookup feature can be updated only if both of the following conditions are met:
- There are no duplicate values for the key field (the field specified for Key Field) in existing records.
- The Prohibit duplicate values check box is selected in the setting of the field specified for Key Field.
For example, if you specify the "Product code" field in the "Product Management" app for Key Field, the following must be met: the "Product code" field in the "Product Management" app does not contain duplicate values, and the Prohibit duplicate values check box is selected in the setting of the "Product Code" field.
Any field that is set in a table cannot be specified.
Even if you change the setting in the "Lookup" field, values in the following field of existing records do not change.
- Fields specified for Field Mappings in the "Lookup" field setting
Related Information: Video Tutorial to Configure a Lookup
The following video explains how to configure a lookup .