How to Retrieve Data in the Form

Introduction

Case Introduction

In this case, you will learn how to retrieve all the data submitted before when filling out a form.

Application Scenario(s)

In the case of contract management and store order summary, it is possible to retrieve data that has already been submitted in a form to compile and reference them.

Preview

1. When you do not need the retrieved data to be stored to the system, use RelatedQuery to retrieve the data:

2. When you need the retrieved data to be stored to the system, use RelatedData to retrieve the data:

Method One: Retrieve an Aggregate Table

Take the order management as an example:

Creating a Regular Form

1. Create a form named Contract Management and add the following fields:

Field Name

Field Type

Contract Date

Date&Time

Company Name

Single Select

Contract Name

Single Line

Contract Amount

Number

Configuring an Aggregate Table

1. Create an aggregate table and change its name to Retrieve Contract Details. Go to Data Source > Single Form, select Contract Management under Form, and click OK.

2. Then set Row Header and Measure as follows:

  • Row Header: select the Company Name and Contract Name fields.
  • Measure: select the Contract Amount field.

After all settings are done, click Save:

Note:

To create an aggregate table, it is necessary to include at least one measure. If there are no number fields in the source form, add an auxiliary numeric field, which can be used as the measure for the aggregate table.

Setting RelatedQuery

If you do not need the retrieved data to be stored to the system, add the RelatedQuery field to the form:

1. Drag the RelatedQuery field to the form and set Field Properties as follows:

  • Related Form: select the aggregate table — Retrieve Contract Details.
  • Display Fields: select Company Name, Contract Name, and Contract Amount fields.

2. Click Add Condition under Filter Data, and add a filter condition: Company Name in the related form equals Company Name in the current form. Then click OK.

3. Tick Multiple under Show Records. Then the system will display all the data that meet the condition.

Setting RelatedData

1. If you need the retrieved data to be stored to the system, add the RelatedData field to the subform:

Click the RelatedData field and set Field Properties:

  • Related Form: select the aggregate table — Retrieve Contract Details.
  • Display Fields: select the Company Name, Contract Name, and Contract Amount fields.

2. Click Add Condition under Filter Data, and add a filter condition: Company Name in the related form equals Company Name in the current form. Then click OK.

2. Click Data Filling, and tick the fields you will retrieve. Select Fill into new fields from the drop-down list, and click Complete.

Demonstration

See the section "Preview".

Method Two: Retrieve Automations

Creating an Auxiliary Form

Click  and then Copy to Current App. Then change the name of the copied form to Contract Management – Auxiliary.

Setting Automations

1. Create an automation and change its name to Retrieve Contract Details. Then configure a trigger.

  • Trigger: Create Record
  • Triggering Form: Contract Management

After finishing the settings, click Complete.

2. Configure triggered actions as follows:

  • Triggered Action: Create Record
  • Target Form: Contract Management – Auxiliary
  • Set field values: The field values in the auxiliary form correspond to those in the original form.

After finishing the settings, click Complete.

After all settings are completed, click Save.

Setting RelatedQuery

If you do not need the retrieved data to be stored to the system, add the RelatedQuery field to the form:

1. Drag the RelatedQuery field to the form and set Field Properties as follows:

Related Form: select the form — Contract Management – Auxiliary.

Display Fields: select Company Name, Contract Name, and Contract Amount fields.

2. Click Add Condition under Filter Data, and add a filter condition: Company Name in the auxiliary form equals Company Name in the current form. Then click OK.

3. Tick Multiple under Show Records. Then the system will display all the data that meet the condition.

Setting RelatedData

1. If you need the retrieved data to be stored to the system, add the RelatedData field to the subform:

Click the RelatedData field and set Field Properties:

Related Form: select the form — Contract Management – Auxiliary.

Display Fields: select the Company Name, Contract Name, and Contract Amount fields.

2. Click Add Condition under Filter Data, and add a filter condition: Company Name in the auxiliary form equals Company Name in the current form. Then click OK.

3. Click Data Filling, tick the fields you will retrieve. Select Fill into new fields from the drop-down list, and click Complete.

Demonstration

See the section "Preview".

Was this information helpful?
Yes
NoNo
Need more help? Contact support