Query Data
Introduction
Feature(s)
Through the Query Data field, you can query one or more records automatically from other forms without storing them to the system.
Application Scenario(s)
- In the case of order management, you can set the customer name as a filter condition to query all orders placed by this customer.
- In the case of course management, you can set the course date as a filter condition to query all course arrangements of a certain date.
- In the case of personnel management, you can set the current member as a filter condition, so that the member can only view their own personal information and attendance records.
Preview
For example, when you enter the client name, all related sales information will be retrieved automatically.
Field Properties
For basic settings of Field Properties, see Fields.
Related Form
A related form refers to the form from which you retrieve data via Query Data. This form can be:
- The current form,
- A form in the current app,
- A cross-app form,
- An aggregate table (the data format will be synchronized),
- An output table from a data stream in Data Factory.
To select a related form, click Query Data > Field Properties, and select the form you need from the drop-down list under Related Form.
Sorting Data
After setting the related form, click to sort data from the related form. Then the retrieved data will be displayed according to the sorting rules. The sorting rule has two parts:
- Sorting fields: You can select the following sorting fields.
- Form fields: Single Line, Number, Date&Time, Radio, Single Select, and Serial No
- System fields: Created Time, Updated Time, and URL Parameter
- Sorting order: You can sort data in ascending or descending order.
Note:
You can sort data only when you select Multiple in Show Records.
Display Fields
Display Fields refer to the fields that will be queried from the related form. These fields will only be displayed to the members when they fill out the form and will not be stored to Manage Data, nor can they be used in calculations such as formulas.
To add display fields, click beside Display Fields. You can also sort, rename, and delete the added display fields.
Note:
The display fields will not count toward the total number of fields in your form. For details, see Fields.
Filter Data
You can add conditions to filter data from the related form. Then only the data that meets the conditions will be displayed in the field as the query result.
Click Add Condition, and you need to make the following settings.
- Relationship between multiple conditions: When there are multiple filter conditions, you can choose to match all of or any of the conditions.
- all of: Only data that meets all the conditions will be displayed after the query.
- any of: Data that meets any of the conditions will be displayed after the query.
- Fields in the related form: You can select fields from the related form or select a system field (Created User, Created Time, Updated Time, or Workflow Status).
- Filter relationship: You can set different filter relationships according to the selected field type. Filter relationships include equals, does not equal, equals any, does not equal any, contains, does not contain, is empty, is not empty, and so on.
- Field value: You can select Fields or Custom. If you select Custom, you need to enter the data manually.
After the settings, click OK.
Note:
If you add records directly on the Manage Data page in a workflow form, the workflow status of these records is empty. Therefore, they cannot be retrieved when you set the filter condition as when Workflow Status equals Completed.
Show Records
Under Show Records, you can choose either Single or Multiple. If you select Multiple, multiple records will be displayed. If you select Single, only the latest record will be displayed.
Single
Multiple
Note:
If you tick Multiple under Show Records, a maximum of 1000 rows of records can be displayed.
Related Form Actions
If members cannot find the desired data when selecting data from the related form, they can click New to add data directly. To make this happen, you need to tick Create records to related form.
Note:
1. This feature is unavailable when the related form is an aggregate table or an output table from the data stream in Data Factory.
2. This feature is not available when Show Records is set to Single.
Note(s)
1. Because the data retrieved via Query Data is not stored to the system, it will not be displayed on the Manage Data page and in detail tables. It will be displayed only when you fill out the form.
2. You can sort the data retrieved via the Query Data field, and up to three sorting rules can be set.