Lookup fields and lookups
A lookup field is a field in a project’s widget (table, feature attributes, etc.) whose type is determined as a lookup type.
A lookup is a configured item that represents a field that creates a relationship between two tables by allowing data in one table to point to records in another table.
In other words, a lookup is a field in a table whose value is retrieved from another table.
To make lookup fields work, specific lookups should be configured on Lookups page.
Lookups page
Represent all lookups that are created for corresponding lookup fields in the projects.
The Add Lookup button allows to create a new lookup.
Lookups within one workspace are available for each project within Manager and Mobile.
The user can add any number of new lookups.
Lookup types
Lookup type | Description | Usage |
---|
Static | Not related to any specific table, but represents a table itself Contains two columns - Key and Display Value Display Value is used as a visible dropdown options/field values in Clearion Web Key is used as a value which will be set in a field when a user selects a dropdown option
| Dropdown options Field values in Tables
|
Domain | | Dropdown options Field values in Tables
|
Table | Table lookup represents a set of unique values from one specific column in a particular table The selection of unique values is done on the client side (Studio) Table Lookups support mapping display and value fields
| |
Unique Values | Unique Values lookup represents a set of unique values from one or multiple columns in one or multiple tables The selection of unique values is done on the server side (Portal) Unique values lookups support multiple source tables and fields
| |
Dynamic | Dynamic lookup represents a set of unique values from one or multiple columns in one or multiple tables It has a script inside that can be a JS script or an Arcade script Depending on the script type used, it can return a key for one of the lookups of any other type (JS script) or data itself (Arcade script)
| |
Lookups configuration
Static lookups - configuration
Tab | Option | Required? | Description | Visualization |
---|
Properties | Groups | Yes | | |
Properties | Name | Yes | |
Properties | Key | Yes | The key field determines the uniqueness of the created item; when merging and cloning groups or projects, items are sorted according to the key field Сhanging the key affects other parts of the configuration, namely, the field in which this lookup was selected is cleared if the key is changed
|
|
|
|
|
Properties | Description | No | |
Properties | Sort Order | No | |
Properties | Data Type | No | |
Properties | Value Type | Yes | |
Data | Columns | No | | |
Data | Filters | No | |
Data | Export | No | |
Data | Add Record | Yes | Open a form for the Value and Display value creation Display Value represents a value that will be displayed for users Value represents a value that will be set in a feature table field when a Display Value is selected Active If true, then the option is available in Clearion Web dropdowns If false, then the option is not available in Clearion Web dropdowns
| 
|
Static lookups - additional options
Tab | Option | Description | Visualization |
---|
Properties | Import Lookup - Soft Overwrite | Imports a JSON file and creates a new Static lookup with the information from a file To import a JSON it should be previously exported from a Table lookup Soft Overwrite means that the previously exported lookup receives a ‘(duplicated)’ mark in the Key field, and a new Static lookup is automatically populated in the field where the exported lookup was used When importing a table lookup file only Value Field Name will be added to a new lookup
| |
|
Properties | Import Lookup - Hard Overwrite | Imports a JSON file and creates a new Static lookup with the information from a file To import a JSON it should be previously exported from Table lookup Hard Overwrite means that the previously exported lookup is deleted and a new Static lookup automatically populated in the field where the exported lookup was used When importing a table lookup file only Value Field Name will be added to a new lookup
| |
Domain Lookups - configuration
Option | Required? | Description | Visualization |
---|
Name | Yes | | 
|
Key | Yes | The key field determines the uniqueness of the created item; when merging and cloning groups or projects, items are sorted according to the key field Сhanging the key affects other parts of the configuration, namely, the field in which this lookup was selected is cleared if the key is changed
|
Group | Yes | |
Description | No | | |
Table Name | Yes | | |
Field | Yes | | |
Sort Order | No | | |
Domain Lookups - additional options
Tab | Option | Description | Visualization |
---|
Properties | Replace Widget | | |
Table Lookups - configuration
Tab | Option | Required? | Description | Visualization |
---|
Properties | Name | Yes | | 
|
Properties | Key | Yes | The key field determines the uniqueness of the created item; when merging and cloning groups or projects, items are sorted according to the key field Сhanging the key affects other parts of the configuration, namely, the field in which this lookup was selected is cleared if the key is changed
|
Properties | Group | Yes | |
Properties | Sort Order | No | | |
Properties | Table Name | Yes | | |
Properties | Where Clause | No | Works as a SQL WHERE expression Allows to filter out records by a specific condition. For instance: 1=1 is set by default and includes all records in a result without applying any specific filter condition
| Table Lookup fields Where Clause only Async Search + default Where Clause Async Search + specified Where Clause |
Properties | Async Search | No | Works as a SQL LIKE expression A field name should be entered in the field In conjunction with the ‘Where Clause’ field, it works through logical operators AND/OR The logical operator is ignored if the Async Search field is empty
|
Properties | Value Field Name | Yes | | |
Properties | Display Field Name | Yes | |
Properties | Sub Fields | No | | |
Properties | Description | No | | |
Table Lookups - additional options
Tab | Option | Description | Visualization |
---|
Properties | Export to JSON | | |
Properties | Replace Widget | | |
Data | - | | |
Data | Services | | |
Data | Columns | | |
Data | Filters | | |
Data | Export | | |
Unique Values Lookups - configuration
Tab | Option | Required? | Description | Visualization |
---|
Properties | Name | Yes | | 
|
Properties | Key | Yes | The key field determines the uniqueness of the created item; when merging and cloning groups or projects, items are sorted according to the key field Сhanging the key affects other parts of the configuration, namely, the field in which this lookup was selected is cleared if the key is changed
|
Properties | Group | Yes | |
Properties | Sort Order | No | | |
Properties | Where Clause | No | Works as a SQL WHERE expression Allows to filter out records by a specific condition. For instance: 1=1 is set by default and includes all records in a result without applying any specific filter condition
| |
Properties | Async Search | No | Works as a SQL LIKE expression A field name should be entered in the field In conjunction with the ‘Where Clause’ field, it works through logical operators AND/OR Logical operator is ignored if the Async Search field is empty
|
Properties | Fields | Yes | | |
Properties | Table Name | Yes | |
Properties | Field | Yes | |
Unique Values Lookups - additional options
Tab | Option | Description | Visualization |
---|
Properties | Replace Widget | | |
Properties | Import Lookup - Soft Overwrite | Imports a JSON file and creates a new Unique Values lookup with the information from a file To import a JSON it should be previously exported from a Table lookup Soft Overwrite means that a previously exported lookup receives a ‘(duplicated)’ mark in the Key field, and a new Unique Values lookup is automatically populated in the field where the exported lookup was used When importing a table lookup file only Value Field Name field will be added to a new lookup
| |
Properties | Import Lookup - Hard Overwrite | Imports a JSON file and creates a new Unique Values lookup with the information from a file To import a JSON it should be previously exported from a Table lookup Hard Overwrite means that a previously exported lookup is deleted and a new Unique Values lookup is automatically populated in the field where exported lookup was used When importing a table lookup file only Value Field Name field will be added to a new lookup
| |
Properties | Export to JSON | | |
Properties | Import Lookup | |
Dynamic Lookups - configuration
Option | Required? | Description | Visualization |
---|
Groups | Yes | | 
|
Name | Yes | |
Key | Yes | The key field determines the uniqueness of the created item; when merging and cloning groups or projects, items are sorted according to the key field Сhanging the key affects other parts of the configuration, namely, the field in which this lookup was selected is cleared if the key is changed
|
|
Description | No | |
Triggers | Yes | |
Script | Yes | Depending on its type, the script returns a specific lookup key or data to populate the current dropdown list. JS script returns a key, for example: return 'Demo >> CSR_Resources_Clearion'; ; Arcade scripts return attributes that should be defined in a script: return { returnFeatures: attributes };
|
|