Understand Lookup Field
The lookup field enables you to create a relationship between forms. Using this relationship you will be able to lookup data from another form in the same application or from a form in a different application in your Zoho Creator account. This mapping of data is done using the record ID. Each record that you add using your forms will generate a record ID, which serves as a backend reference to accomplish data sync. When you are filling a form, the lookup field will show the list of values or records that have been added in the related form. And when you choose a value and submit the current form, a mapping is established between both the forms and this mapping of data is done using the record ID.
Let's assume you are a law firm and you have a Legal Case Management application to run your business. The app has modules to store and view data on your lawyers, clients, cases that your firm is engaged in, case details, case histories, hearing details, payment details, and more.
The three important modules of this app would be:
-
a Lawyer form to capture all details of all the lawyers associated with your firm
-
a Client form for your client details
-
a Case Details form to capture details about the lawyer or lawyers handling the case, the client, and information on the case like documents related to the case, the payments made, and more
This Case Details form includes lawyer and client information which has already been captured in the Lawyer and Client forms. Instead of adding two new fields for Lawyer and Client you can add a lookup field in the Case Details form, through which you will be able to access the data in the other two forms and reuse them here, thus avoiding redundancy of data and fields.
Advantages of Using a Lookup Field
Lookup field helps you with:
Lookup Field Traits
When you add the lookup field to your form, you need to do the following. Learn
how to add a lookup field
-
Define the
Relation
: Here you select the form that you want to establish a relationship with
-
You can create a new relationship or a unidirectional relationship, or
-
You can use an existing relationship, to create a bidirectional relationship.
Learn more
-
Set the
Display Type
: This defines the way in which the looked-up data will be displayed when your users access this lookup field, and the numbers of values your users will be allowed to select — one or many.
-
Dropdown
: The looked-up data will be displayed in a dropdown, and your users will be able to select one value
-
Radio Button
: The looked-up data will be displayed as radio buttons, and your users will be able to select one value
-
Multi Select
: The looked-up data will be displayed in a drop-down menu, and your users will be able to multiple values
-
Checkbox
: The looked-up data will be displayed as checkboxes, and your users will be able to multiple values
Customize Lookup's Display Fields
You can customize the manner in which the related form's records are displayed by your lookup field. You can have the lookup field display the data stored in one field of the related form, or from multiple fields. When you select multiple fields, you can define if any separator is to appear between the field values.
Learn how
The lookup field can display data from the following
types of field
: name, address, email, phone, single line, number, percent, currency, decimal, auto number, radio, drop down, date, date-time, formula, users, ID, added user, modified user, added time, and modified time.
Note
: You can add only upto
four
display fields for your lookup field.
Allow New Entries Through the Lookup Field
There can be instances where the data (in the related form) that a user wants to look up, is not present in it. Instead of making the user access the related form, then add the required data, and then look it up from your form, you can enable them to add records to the related forms via the lookup field itself.
Learn how to enable this
After enabling the
Allow new entries
property of the lookup field, below is what a user will experience upon accessing your form:
-
The
Add New Entry
option will be displayed by the lookup field as the last choice
-
Clicking or tapping it will open the related form in a pop-up window, where you can enter and submit the required data
-
The entered data will be added to the related form, and will also be selected in the lookup field
Set Value While Adding New Entries in the Lookup Field
As mentioned above, in a lookup field's
Field Properties pane, you have the option to allow
adding new entries to the looked-up form that pops up. If this is enabled, you can also allow auto-population of field values. That is, values entered by you in the current form (holding the lookup field) get preset in the looked-up form. These populated values can be edited if needed before form submission. This saves you one step of replicating the information that you might have added in the current form before creating an entry in the lookup field.
To achieve this auto-population, you have to map the fields in the looked-up form where the data has to be replicated to the fields in the current form from which the data will be secured.
This configuration needs to be done from the edit
mode of the application.
Learn more
Note: The following fields are not supported for auto-population:
URL,
Image,
SubForm,
Signature,
File upload,
Audio,
Video,
Auto Number,
Formula,
Section,
Add Notes,
Prediction,
Keyword Extraction,
Sentiment Analysis,
OCR,
Object Detection.
Let's assume you have
configured the necessary field mapping for a lookup field in the edit
mode of an application
Employee Management. Now, say you've entered the following information in the live mode of a form
Add Team:
In this form, Team Members is a lookup field. When you click +Add New in this field, the looked-up form Add Employee pops up. Upon loading, this looked-up form will have auto-populated field values from the matching fields in your current form. You can choose to edit the prefilled values or fill in other fields if needed before form submission. After submission, the record is added to the Add Employee form and is selected as a choice in the lookup field of the current Add Team form.
Filter the Records that the Lookup Field Displays
By default, the lookup field displays all the records present in the looked-up form. However, you can apply a filter based on data in the looked-up form. Learn how
The filter you set will be applied every time your users access the lookup field, both while adding and editing a record.
Other Field Properties