Using Subform Records to Update or Add Subform Records

Introduction

Feature Overview

When you update records in the subform of a form (triggering form), Automations Pro will be triggered to update or add subform records in another form (target form). If you add a filter under Conditions for the target form, Automations Pro will act differently based on your settings.

Here are the details:

l If some subform records in the target form meet the condition you set, Automations Pro will update these matched subform records.

l If no records meet the condition, add new records to the subform.

Scenario

Scenario Name

Problem Statement

Problem Solving

Order collection

How to synchronize records in the Collection Follow-up form with updates in the Order form?

2. Input the information of a new order to the subform, Order Details, in the Order form;

3. When that record is approved, it will be synchronized automatically to the subform, Collection Plan, in the Collection Follow-up form;

4. Future updates and addition in the Order Details subform will be synchronized to the Collection Plan subform automatically.

Preview

In the Order form, there exists only one record with the Order Number, Jodoo-001:

Submit a record numbered Jodoo-002 through the Order form. At the same time, a new record with the same details is added to the Collection Plan subform in the Collection Follow-up form:

Namely, when the fields in the main form do not meet filtering conditions, the new record will be added to the target form no matter whether the subform records match with any to-be-updated records.

2. Update the details of Jodoo-002 in the Order form. Change the value in the Amount of the purchased mouse. The update is synchronized to the Collection Plan subform in the Collection Follow-up form:

Namely, when the fields in the main form meet filtering conditions, and the subform records match with to-be-updated records, the new record will be added to the subform in the target form.

3. Add a record to Jodoo-001 in the Order form. The addition is synchronized to the Collection Plan subform in the Collection Follow-up form.

Namely, when the fields in the main form meet filtering conditions, but the subform records match with none of the to-be-updated records, the new record will be added to the target form.

Building the Forms

Create a new workflow form, and rename it as Order. Then, add to it a subform named Order Details. The field settings are as follows:

Field Type

Order Number

Single Line

Customer

Single Line

Date&Time

Order Details

SubForm

SubForm - Single Line

Order Details.Product Name

SubForm - Single Line

SubForm - Number

Order Details.Unit Price

SubForm - Number

Order Details.Sub Total

SubForm - Number

Order Total

Number

Approval Outcome

Radio

2. On the Workflow page, set the workflow of the Order form, including the Node Approver and Field Permissions. For details, see Configuring a Workflow.

a. Configure Field Permissions at the Start node

b. Configure the Node Approver and the Field Permissions at the Approval node

3. Create a Collection Follow-up form, add to it a subform named Collection Plan. The settings are as follows:

Field Name

Field Type

Order Number

Single Line

Customer

Single Line

Latest Delivery Time

Date&Time

SubForm - Single Line

SubForm - Single Line

Collection Plan.Quantity

SubForm - Number

Collection Plan.Unity Price

SubForm - Number

Collection Plan. Sub Total

SubForm - Number

Order Total

Number

Setting Automations Pro

Creating Automation Pro

To create an automation,

1. Click Extension > Automations > New Automation.

2. Rename the automation.

3. Choose the trigger type, Form Trigger, and choose the Order form from the drop-down as the triggering form.

Setting Trigger Node

Select the trigger node and set it as follows, allowing Automations Pro to be triggered after approval:

1. Select a trigger: Update record

2. Add a triggering condition: Approval Outcome equals Approved

Adding Update Record Node

Add a Update Record node after the trigger node.

Setting Update Record Node

Set Update Record further. The details are as follows:

1. Select what to update:

Under Update, choose Record in the form to update records within a target form. Then choose the Collection Follow-up form as the target form.

2. Filter and select the records required to be updated

Add filtering conditions to select the records that are of the same order number with those in the trigger data from the Collection Follow-up form:

a. Filtering condition: Order Number equals Trigger Data -- Order Number

b. Tick the option, If no record is to be updated, add one to the corresponding form

Note

1. By applying the condition, we filter out unwanted records. No updating is executed at the moment.

c. When the node is on execution, if no record from the main form is selected, Automations Pro will identify the situation as no record is to be updated, and add records to the corresponding main form.

3. Set field values

a. Update records

Update the selected records from the Collection Follow-up form. The settings are as follows:

l Add the to-be-updated fields and set their field values: The subform fields from the trigger data will assign values to the corresponding fields in the Collection Plan subform, thus executing the updating.

n Collection Plan.Product Number equals Trigger Data--Order Details.Product Number

n Collection Plan.Product Name equals Trigger Data--Order Details.Product Name

n Collection Plan.Quantity equals Trigger Data--Order Details.Quantity

n Collection Plan.Unit Price equals Trigger Data--Order Details.Unit Price

n Collection Plan.Sub Total equals Trigger Data--Order Details.Sub Total

l Match the to-be-updated records with the trigger data: Before updating, the trigger data should match the corresponding records in the Collection Follow-up form based on the values in the Product Number field.

n Collection Plan.Product Number equals Trigger Data--Order Details.Product Number

Note:

1. If a product detail record does not match any to-be-updated subform record through Product Name, Automations Pro will identify the situation as no record is to be updated, and add a record to the corresponding subform.

2. No update will executed on records left unmatched in the Collection Plan subform.

b. Add records

If there is no collection or product record that matches the trigger data, corresponding records to the trigger data will be added to the Collection Follow-up form. The detailed settings are as follows:

l Click Add Record:

l Set field values: Let the subform fields from the trigger data assign values to the corresponding fields in the Collection Plan subform. When new records are submitted through the trigger data’s subform, corresponding subform records will be added to the Collection Follow-up form.

n Collection Plan.Product Number equals Trigger Data--Order Details.Product Number

n Collection Plan.Product Name equals Trigger Data--Order Details.Product Name

n Collection Plan.Quantity equals Trigger Data--Order Details.Quantity

n Collection Plan.Unit Price equals Trigger Data--Order Details.Unit Price

n Collection Plan.Sub Total equals Trigger Data--Order Details.Sub Total

Save and Enable

Completing all the settings, click Save and Enable to put the Automations Pro into use.

Notes

1. Automations Pro does not support the synchronization od records deleting between subforms. Namely, a record deleting in a form’s subform does not affect data in another form’s subform.

2. When updating records, you can refer to Subform Assignment Rules for details.

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