Lookups
Lookups are fields used to obtain a subset of options from available values in fields, tables, webhook API responses, or database query responses. Existing data available in the organization can be reused using lookups. Lookups usually return multiple options that are displayed to the end-user using Dropdown or Multi Select fields.
Lookups help organizations maintain consistent data through all modules. As lookups reuse data that is already available, it eases the task of mapping and managing data in the organization.
Benefits of lookups
- Compile and reuse data from various modules
- Maintain consistency in available data
- Populate values dynamically
- Improve data entry
- Reduce storage space
Types of lookups in Qntrl
Qntrl currently supports 4 types of lookups.
- Field Lookup
- API Lookup
- Table Lookup
- Database Lookup
Field lookup compiles a particular field’s value from different cards in a form and populates the compiled data in a dropdown or multi select field.
API lookup generates webhook responses and filters the responses using a data path. The result data obtained is displayed in a dropdown or multi select field.
Table lookup fetches an entire column’s data from a selected table and populates the data in a dropdown or multi select field.
Database lookup fetched data from remote databases and lists them in Qntrl.
A total of five lookups and relation fields can be used per Organization.
Field Lookup
Field Lookup can be used to populate field values from different cards in a form into a dropdown or multi select field. For example, every time a new employee joins the company, a card is created in the Employee Onboarding Form, that records employee details like Name, Position, Experience, and so on. Every such value available in different cards can be compiled and listed as a common dropdown or multi select field using Field Lookup.
- Navigate to and select Orchestration from the menu.
- Select an orchestration name from the list.
- You will land in Step 1: Create Form.
- Drag and drop Field Lookup from the New Fields tray onto the right panel.
- Enter a Field Title . This field is mandatory and must be unique in each form.
-
Click
Set field label hyperlink to add field label.
-
The field is displayed with the label name in the form.
-
Configure the lookup details:
- Form: Select a form to list its fields.
- Field: Select a field to populate lookup values.
- Note that all users are allowed to view the selected field’s values even if they do not have the required field level permission.
- Display Type: You can choose to display lookup values in either a dropdown or multi select field format.
- Set the field-level validations:
- Mandatory: Toggle YES to make the field mandatory.
- Visibility: Toggle YES to make the field visible while creating cards.
A maximum of five Field lookup and Relation fields can be created.
Field lookup options are updated whenever new cards with different field values are created.
If the field linked to a field lookup has no value, the lookup options will be rendered empty.
On modifying either the form or field in field lookup properties, the field lookup values already selected in existing cards will not change. However, you can change these manually with the newly populated lookup values.
Only Single-Line, Dropdown, User Dropdown, Date & Time, Decimal, Integer, and Email Address fields can be configured for field lookup.
Once a form is deleted, field lookup mapping with other forms will also be deleted.
Field lookup is not supported in Qntrl's mobile app yet.
API Lookup
API lookup enables you to look for specific information among a bulk of API response data. Using API lookup, you can run an existing webhook, obtain the response data in your preferred format of JSON/XML/Text, and filter the response using a data path to fetch only the required result data.
For example, if you have a webhook configured to fetch the real-time weather details from a third-party website, the API response data will comprise many parameters, such as date, time, place, weather in Celsius, and weather in Fahrenheit. Among all these details, if you want to fetch a single detail— say, weather in Celsius— it can be filtered using the data path and listed as a dropdown or multi select field to the end-users using API lookup.
- Navigate to and select Orchestration from the menu.
- Select an orchestration name from the list.
- You will land in Step 1: Create Form.
- Drag and drop API Lookup from the New Fields tray onto the right panel.
- Enter a Field Title. This field is mandatory and must be unique in each form.
- Click Set field label hyperlink to add field label.
- The field is displayed with the label name in the form.
- Configure the lookup details:
- Webhook: Select an existing webhook from the dropdown.
- Response Data Format: Select a repose format from the available options— JSON, XML or Text—and click Apply.
- Data Path: Enter the data path to filter the response, then click Check . This is applicable only for JSON and XML response formats. Learn in detail about the data path to be entered <link>.
- Result Data: This field will be auto-populated with the filtered data once we check the data path. Choose the result data from the dropdown.
- Display Type: You can choose to display lookup values in either a dropdown or multi select field format.
- On choosing dropdown, each option will be trimmed to display only 200 characters.
- Set the field-level validations:
- Mandatory: Toggle YES to make the field mandatory
- Visibility: Toggle YES to make the field visible while creating cards.
- Click Ok.
- Only five lookup and relation fields can be created.
- If a webhook associated with API lookup is deleted or disabled, the lookup will not render any value.
When the response obtained from webhooks are of JSON or XML formats, the data path must be included to filter the obtained response data. Data path helps to identify and group similar values in the result dropdown.
Generic data path format
For JSON response: $.<JSONArrayName>[].<JSONObejctName>.key
For XML response: /RootElement/Element/@Attribute/Type
Examples
We’ve compiled a set of sample responses and their corresponding data paths below.
JSON response 1
{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "Sincere@april.biz",
"address": {
"city": "Gwenborough"
},
"phone": "1-770-736-8031",
"website": "hildegard.org"
}
Data path
Here ‘$’ represents overall (root) response
To fetch the name:
$.name
Result data: Leanne Graham
To fetch the city:
$.address.city
Result data: Gwenborough
To fetch the address:
$.address (Returns a string)
Result data: { "city" : "Gwenborough" }
JSON response 2
[
{
"userId": 1,
"name": "Leanne",
"title": "quidem molestiae enim"
},
{
"userId": 2,
"name": "Ervin",
"title": "sunt qui excepturi placeat culpa"
},
{
"userId": 3,
"name": "Clementine",
"title": "omnis laborum odio"
},
{
"userId": 4,
"name": "Patricia",
"title": "eaque aut omnis a"
}
]
Data path
Here ‘$[*]’ represents overall (root) response and index starts from 0.
To fetch all the names:
$[*].name
Result data: [Leanne , Ervin , Clementine, Patricia]
To fetch the second name:
$[1].name
Result data: Ervin
To fetch the first 3 users:
$[0-2].name or
$[-2].name
Result data: [Leanne , Ervin , Clementine]
To fetch last 3 users: $[1-].name
Result data: [Ervin , Clementine, Patricia]
XML response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<employees>
<employee id="1">
<firstName>Lokesh</firstName>
<lastName>Gupta</lastName>
<department>
<id>101</id>
<name>IT</name>
</department>
</employee>
<employee id="2">
<firstName>Brian</firstName>
<lastName>Schultz</lastName>
<department>
<id>102</id>
<name>HR</name>
</department>
</employee>
<employee id="3">
<firstName>Alex</firstName>
<lastName>Kolenchisky</lastName>
<department>
<id>103</id>
<name>FINANCE</name>
</department>
</employee>
<employee id="4">
<firstName>Amit</firstName>
<lastName>Jain</lastName>
<department>
<id>104</id>
<name>HR</name>
</department>
</employee>
<employee id="5">
<firstName>David</firstName>
<lastName>Beckham</lastName>
<department>
<id>105</id>
<name>DEVOPS</name>
</department>
</employee>
</employees>
Data path
To fetch all employee names:
/employees/employee/firstName/text()
Result data:[Lokesh, Brian, Alex, Amit, David]
To fetch all employee IDs:
/employees/employee/@id
Result data: [1,2,3,4,5]
Troubleshooting steps
- Check if you are able to generate the webhook response by clicking Apply.
- Check if your data path displays result data by clicking Check.
- Check if data path complements the response data and its format.
Table Lookup
Qntrl's tables store and organize data in an easy-to-interpret tabular format. Table lookup fetches data from a table’s column and populates it in a dropdown or multi select field for the end-user.
For example, if you have a table to store your employee details, each column will contain details like employee ID, employee name, age, salary, and other information. If you want to fetch a list of all your employee names, you can use table lookup and get all the entire column details.
- Navigate to and select Orchestration from the menu.
- Select an orchestration name from the list.
- You will land in Step 1: Create Form.
-
Drag and drop
Table Lookup from the New Fields tray onto the right panel.
-
Enter a Field Title. This field is mandatory and must be unique in each form.
-
Click Set field label hyperlink to add field label.
-
The field is displayed with the label name in the form.
-
Configure the lookup details:
-
Table: Select a table to lookup data.
-
Column: Choose a column from the table.
-
Display Type: You can choose to display lookup values in either a dropdown or multi select field format.
-
On choosing dropdown, each option will be trimmed to display only 200 characters.
-
Set the field-level validations:
-
Mandatory: Toggle YES to make the field mandatory.
-
Visibility: Toggle YES to make the field visible while creating cards.
Note:
- Only five lookup and relation fields can be created.
- If the table associated with lookup is deleted, the lookup will not render any value.
DB Lookup
Database Lookup allows organizations to fetch data from their remote databases and list them in Qntrl. DB lookup uses Bridge and Connectors to establish a secure connection with external databases and queries for response.
DB lookup can only be used to READ external databases. Other actions like update or delete are not allowed. This ensures that the customer’s external database is secure and intact at all times.
For example, the customer might maintain a remote database to store all the vendor details. If the customer wants to populate this data in Qntrl, without having to replicate the data again, DB lookup can be used. DB lookup connects with the customer’s database, queries the database, and lists the response in a dropdown or multi select field in Qntrl.
- Navigate to and select Orchestration from the menu.
- Select an orchestration name from the list.
- You will land in Step 1: Create Form.
- Drag and drop DB Lookup from the New Fields tray onto the right panel.
- Enter a Field Title . This field is mandatory and must be unique in each form.
- Click Set field label hyperlink to add field label.
- The field is displayed with the label name in the form.
- Configure the lookup details:
- Connector: Select an existing connector or create a new one for the database.
- Mid Server: Select an existing mid server or create a new one.
- Display Type: You can choose to display lookup values in either a dropdown or multi select field format.
- On choosing dropdown, each option will be trimmed to display only 200 characters.
- Database Query: Type the command to query the database.
- If no limit is specified in the query, only 20 results will be listed.
- Set the field-level validations:
- Mandatory: Toggle YES to make the field mandatory.
- Visibility: Toggle YES to make the field visible while creating cards.
DB lookup lists only 20 results at a time if no limit is specified in the database query.
Relation Fields
Relation fields can be used to establish connections between cards of same or different orchestration in Qntrl.
While linking cards of different blueprints, the relationship can be:
- Dependent cards - One workflow leads to another to complete the process.
- Linked cards - Brings in information from one workflow to another making cards more intelligent.
- Parent-child cards - The main workflow is distributed into sub-flows and these sub-flows, in turn, go back to the main workflow for the process to be completed.
To create a new relation field,
- Navigate to and select Orchestration from the menu.
- Select an orchestration name from the list.
- You will land in Step 1: Create Form .
- Drag and drop the Relation field from the New Fields tray onto the right panel.
- Enter a Field Title . This field is mandatory and must be unique in each form.
- Click Set field label hyperlink to add field label.
- The field is displayed with the label name in the form.
- Set the relation details:
- Form: Select a form to list its cards.
- Relation title: Enter a title for the relation.
- Display Type: You can choose to display the cards in either a dropdown or multi select field format.
- Configure the field-level validations:
- Mandatory: Toggle YES to make the field mandatory.
- Visibility: Toggle YES to make the field visible while creating cards.
Create a new card in the above used orchestration. Select cards in the relation field to establish a relation.
Now, visit the selected cards to view the related cards table. You can also click on the card name right from the relation field, in the card details page, to navigate to the related card.
A maximum of five Field lookup and Relation fields can be created.
Cards connected using relation fields can be viewed under Related Cards .
Once a form is deleted, relation field mapping with other forms will also be deleted.
Relation field is not supported in Qntrl's mobile app yet.
Cards connected using relation fields are displayed under Related Cards.