Lookups page

Prev Next

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

  • A domain lookup represents a database field that stores a set of values

  • These values can be used as dropdown options

  • 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

  • Dropdown options

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

  • Dropdown options

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)

  • Dropdown options

Lookups configuration

Static lookups - configuration

Tab

Option

Required?

Description

Visualization

Properties

Groups

Yes

  • Select a Group where the created item will be stored

Properties

Name

Yes

  • A visual name that the user can see in a list of lookups in the field

  • Can be changed without affecting other parts of the configuration

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

  • The field is informative and describes the lookup purpose

Properties

Sort Order

No

  • Sorts the field values

Properties

Data Type

No

  • Mobile configuration field

Properties

Value Type

Yes

  • Must match the desired format of the data being sent

Data

Columns

No

  • Allows to hide or display columns in the Data tab

Data

Filters

No

  • Allows to filter data in the Data tab

Data

Export

No

  • Allows to export as a document

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

  • Visual name that the user can see in a list of lookups in the field

  • Сan be changed without affecting other parts of the configuration

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

  • Select a Group where the created item will be stored

Description

No

  • The field is informative and describes the lookup purpose

Table Name

Yes

  • Source table name

  • Table should be added to a Data Source > Tables in advance

Field

Yes

  • Field from the source table

  • The field must contain the list of domain values in the portal table

Sort Order

No

  • Sorts the field values

Domain Lookups - additional options

Tab

Option

Description

Visualization

Properties

Replace Widget

  • Replaces Lookup A with Lookup B for all widgets in a project where Lookup A was applied

Table Lookups - configuration

Tab

Option

Required?

Description

Visualization

Properties

Name

Yes

  • Visual name that the user can see in a list of lookups in the field

  • Сan be changed without affecting other parts of the configuration

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

  • Select a Group where the created item will be stored

Properties

Sort Order

No

  • Sorts the field values

Properties

Table Name

Yes

  • Source table name

  • Table should be added to a Data Source > Tables in advance

Properties

Where Clause

No

  • Works as a SQL WHERE expression

  • Allows to filter out records by a specific condition. For instance:

    • STATUS = 1 will include only active statuses in the returned result

    • NAME IS NOT NULL will not include records where NAME field is empty in the returned result

  • 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

  • Represents a column in a feature table whose values will be populated

Properties

Display Field Name

Yes

  • Represents a column in a feature table whose values will be displayed

Properties

Sub Fields

No

  • The list of the fields from the specified Feature Table

Properties

Description

No

  • The field is informative and describes the lookup purpose

Table Lookups - additional options

Tab

Option

Description

Visualization

Properties

Export to JSON

  • Exports a Lookup configuration to a JSON file

  • This file can be imported via Import Lookup

Properties

Replace Widget

  • Replaces Lookup A with Lookup B for all widgets in a project where Lookup A was applied

Data

-

  • The Data tab displays data from the feature table specified in the lookup settings

Data

Services

  • Determines whether development, testing, staging or production data will be rendered

Data

Columns

  • Displaying columns specified in the Sub Fields

Data

Filters

  • Filtering options by different parameters

Data

Export

  • Exporting tables in different formats

Unique Values Lookups - configuration

Tab

Option

Required?

Description

Visualization

Properties

Name

Yes

  • A visual name that the user can see in a list of lookups in the field

  • Сan be changed without affecting other parts of the configuration

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

  • Select a Group where the created item will be stored

Properties

Sort Order

No

  • Sorts the field values

Properties

Where Clause

No

  • Works as a SQL WHERE expression

  • Allows to filter out records by a specific condition. For instance:

    • STATUS = 1 will include only active statuses in the returned result

    • NAME IS NOT NULL will not include records where NAME field is empty in the returned result

  • 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

  • Clicking the + button opens the Table and Fields configuration

Properties

Table Name

Yes

  • Source table name

  • Table should be added to the Data Source page in advance

  • Multiple tables can be selected to pull values from different sources

Properties

Field

Yes

  • Represents the column in the table whose values will be retrieved

  • These values will also be shown as dropdown options

Unique Values Lookups - additional options

Tab

Option

Description

Visualization

Properties

Replace Widget

  • Replaces Lookup A with Lookup B for all widgets in a project where Lookup A was applied

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

  • Exports a lookup as a JSON file

Properties

Import Lookup

  • Imports a JSON file and allows saving it without overriding the original lookup

  • Key should be updated

Dynamic Lookups - configuration

Option

Required?

Description

Visualization

Groups

Yes

  • Select a Group where the created item will be stored

Name

Yes

  • A visual name that the user can see in a list of lookups in the field

  • Сan be changed without affecting other parts of the configuration

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

  • The field is informative and describes the lookup purpose

Triggers

Yes

  • Indicates which fields in the form will affect the data in the current field.

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 };