With Lookup, an app can reference another app to copy necessary data.
For example, an Order Management app can have a Lookup field that references a Product Management app. This enables users to copy product information from the Product Management app to the Order Management app. Lookup removes effort to re-enter the same data and prevents typing errors.
See What Is Lookup?
Procedure to Set Up a Lookup Field
This section uses an Order Management app and a Product Management app to describe how to set up a Lookup field as shown in the figure above.
Adding Product Records to the Product Management App
The Product Management app must already have some records registered to it before the Order Management app can get data from the Product Management app.
In this example, we will create records that contain the Product Code, Product Name, Unit Price, and other fields.
Adding a Lookup Field to the Order Management App
Next, add a Lookup field to the Order Management app.
Open the Order Management app, click the app setting button on the upper right of the record view, and select the "Form" tab.
Place a table on the form.
Drag and drop a Lookup on the table.
In this example, we configure a Lookup field which will obtain information based on the Product Code.
Add other fields to obtain information 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 pointer over the Lookup field and click the setting button to open the settings screen.
Configure the following settings.
- Set Field Name.
In this example, enter "Product Code".
- Set Datasource App.
Select an app from which you want to copy data. In this example, select the Product Management app.
- Set Key Field.
Select a field that will work as a key to find a corresponding record. In this example, select the Product Code field.
- Set Field Name.
Then, select "Field Mappings".
Other fields can be copied at the same time from a record in the datasource app.
In this example, add the following pairs: Product Name < [Product Management]Product Name, and Unit Price < [Product Management]Unit Price.
Click the plus sign (+) to add as many as fields as you want to copy data from.
If necessary, select "Fields Shown in Lookup Picker".
Fields selected will be displayed to help users select a record appropriately.
For example, when there are multiple records with the same product code, you can easily locate a record by using this option.
In this example, select "Product Name" and "Unit Price". For details, see the "Using Lookup" page.
If necessary, also configure the following items.
Specify the initial filter setting.
This filter setting will be displayed 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, to display all the records, the initial filter setting is not applied.
Set 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.
This example uses "Product Information" as a name.
Click "Update App" on the upper right side of the screen.
Now, the Lookup field is ready.
Other Lookup Example
When you set Lookup, you can also copy data from multi-choice fields or check box fields.
This section describes the way to copy the following data created in the Customer List app to the Project Management app.
- Products (Multi-choice field)
- Options (Check box field)
Since both the Customer List app and the Project Management app use company names, associate these company names to copy products and options.
Place the lookup field as a company name in the Project Management app, and set the field as shown below.
Now, by entering a company name in the Project Management app and clicking Lookup, you can copy products and options from the Customer List app.
Video on How to Set Up Lookup
The following video explains how to set up Lookup .
Notes on Lookup
Once users copy data through a Lookup field, changes to records in the datasource app do not propagate to *copied data in the Lookup field.* **
Users need to click Lookup again to overwrite existing data with the latest data.
To update existing records, it is more efficient to update them in bulk by importing a CSV file.
However, you can use the lookup feature to update the entered values in fields in bulk only if the following conditions are met:
- If there are no overlapping values in the fields that are selected for "Key Field" in the existing record.
- If "Prohibit duplicate values" is selected for the setting in the fields that are selected for "Key Field".
The Key Field can be any of the following fields:
- Record number
Any field that is set in a table cannot be specified.
Even if you modify the setting in the lookup field, values in the following field for the entered record do not change:
- The field that is selected for "Field Mappings" in the setting of the Lookup field.
For details on how to use Lookup, see Using Lookup.