Using Subform Records to Update or Add Subform Records

Introduction

Feature Overview

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

  • If there are subform records in the target form that meet the set condition(s), Automations Pro will update these subform records.
  • If no subform records meet the condition(s), it will add new data to the subform.

Scenario

Scenario Name

Problem Statement

Solution on Jodoo

Payment Collection

How to update the “Collection Follow-up” form timely when there is a new order?

Set an Automations Pro to be triggered when the new order is submitted and approved. It will automatically synchronize the order details to the “Collection Plan” form. 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" being Jodoo-001:

1. 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 record’s field do not meet filtering conditions, the record will be added to the target form no matter whether its subform data is matched with the target data or not.

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

Namely, when the record’s field meets filtering conditions, and the subform records match with target data, the target form will be updated.

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 record’s fields meet filtering conditions, but the subform records match with none of the target data, the new record will be added to the target form.

Building the Forms

1. Create a new workflow form, and rename it as Order, with a subform named Order Details:

Field Name

Field Type

Order Number

Single Line

Customer

Single Line

Latest Delivery Time

Date&Time

Order Details

SubForm

Order Details.Product Number

SubForm - Single Line

Order Details.Product Name

SubForm - Single Line

Order Details.Quantity

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, design the workflow of the Order form, and set the Node Approver and Field Permissions. For details, see Configuring a Workflow.

  • Check Field Permissions for the Start node:

  • Decide Node Approver and Field Permissions for the Approval node:

3. Create a Collection Follow-up form wih a subform named Collection Plan:

Field Name

Field Type

Order Number

Single Line

Customer

Single Line

Latest Delivery Time

Date&Time

Collection Plan

SubForm - Single Line

Collection Plan.Product Number

SubForm - Single Line

Collection Plan.Quantity

SubForm - Number

Collection Plan.Unity Price

SubForm - Number

Collection Plan. Sub Total

SubForm - Number

Orde 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 the 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 an Update Record Node

Under the Trigger node, add an Update Record node

Setting the Update Record Node

1. Select what to update:

Choose Record in the form to update records from a target form. Here, you should select 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, the automation filters out unwanted records. No operation is executed at the moment.

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

3. Set the values for assignment

a. For Update Record

Complete the following settings to update the selected records from the Collection Follow-up form:

  • Add the fields to be updated and set the assignment rules: The subfields from the trigger data will assign values to the corresponding fields in the Collection Plan subform, thus executing the updating.
    • Collection Plan.Product Number equals Trigger Data--Order Details.Product Number
    • Collection Plan.Product Name equals Trigger Data--Order Details.Product Name
    • Collection Plan.Quantity equals Trigger Data--Order Details.Quantity
    • Collection Plan.Unit Price equals Trigger Data--Order Details.Unit Price
    • Collection Plan.Sub Total equals Trigger Data--Order Details.Sub Total
  • Set the matching rules between the to-be-updated fields and the data source: The data source should match the records in the Collection Follow-up form based on the values in the “Product Number” field.
    • 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. For Add Record

If there is no record that matches the trigger data, corresponding records will be added to the Collection Follow-up form:

  • Click Add Record:
  • Set the assignment rules: 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.
    • Collection Plan.Product Number equals Trigger Data--Order Details.Product Number
    • Collection Plan.Product Name equals Trigger Data--Order Details.Product Name
    • Collection Plan.Quantity equals Trigger Data--Order Details.Quantity
    • Collection Plan.Unit Price equals Trigger Data--Order Details.Unit Price
    • Collection Plan.Sub Total equals Trigger Data--Order Details.Sub Total

Save and Enable

Click Save and Enable to put the Automations Pro into use.

Demonstration

See the Preview section.

Notes

1. Automations Pro does not support the synchronization of records deleting between subforms. That is, Automations Pro cannot be triggered to delete the matched target subform record when the trigger data’s subform record is deleted.

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

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