Using Subform Records to Update Subform Records
Introduction
Feature Overview
After adding or updating records to the subfields of a form, Automation Pro will automatically update the records in the subfields in another form.
Scenario
Scenario Name | Problem Statement | Problem Solving |
Order management | Difficult to synchronize the updated records in the Order Updating Form to the Order Form after the updating application is approved | After submitting the new order details to Order Updating Form, after it is approved, it will trigger Automation Pro to update the record in the Order Form |
Preview
After entering the updated order details to the subform of the Order Updating Form, if the application is submitted and approved, the Automation Pro will be triggered and automatically update the order details in the Order Form.
Building the Form
1. Firstly, create a Order Form, and add a subform as Order Details, the field settings are as follows:
Field Name | Field Type | Field Setting |
Order Number | Serial No. | / |
Ordering Time | Date&Time | |
Ordering Staff | Member | |
Customer | Single Line | |
Order Details | SubForm | |
Order Details.Product Name | SubForm-Single Select | |
Order Details.Unit | SubForm-Single Select | |
Order Details.Amount | SubForm-Number | |
Order Details.Price | SubForm-Number | |
Order Details.Sum | SubForm-Number | |
Total Price | Number |
2. Create a workflow form Order Updating Form, and add a subform in the form as the updated order details, the field settings are as follows:
Field Name | Field Type | Field Setting |
Applicant | Member | / |
Application Time | Date&Time | |
Order Number | Serial No. | |
Updated Order Details | SubForm | Set Data Linkage to all the subfields, linking the Order Details of the Order Form |
Updated Order Details.Product Name | SubForm-Single Select | |
Updated Order Details.Unit | SubForm-Single Select | |
Updated Order Details.Amount | SubForm-Number | |
Updated Order Details.Price | SubForm-Number | |
Updated Order Details.Sum | SubForm-Number | |
Updated Total Price | Number | / |
Approval Result | Radio | Options: Yes, No |
3. You can set the workflow of workflow form at Workflow, including approvers at nodes and Field Permissions. For details, see Configuring a Workflow.
l Field Permissions for Start Nodes are as follows:
l Set Task Nodes' all Field Permissions as View and Edit, and set node approver who can receive workflow task message.
Setting Automation Pro
Creating Automation Pro
After building the form, shift to Extension, create an Automation Pro and set its name, select Form Trigger and select the Trigger Form as Order Updating Form. As shown in the following picture:
Setting Trigger Node
Select the trigger node and set it as follows, allowing Automation Pro to be triggered after the updating application is approved:
- Select the trigger action: Workflow flows to the next node
- Select workflow node: Approval Node
- Select node action: Submit
- Add triggering condition: Approval Result equals Passed
Adding Update Record Node
Add an Update Record node after the trigger node, as shown in the following picture:
Setting Updating Record Node
Set Update Record further, the details are as follows:
1. Select updating object
Select the updating object as Record in the form, the target form is Order Form:
2. Filter out the records required to be updated
Add filtering conditions Order Number equals Trigger Data.Order Number, and filter out all the records with the same order number from the Order Form for following updates:
Note:
The filtering conditions mentioned above are just filtering out records that are required to be updated, no updating operation will be executed.
3. Set field value
Update the equipment records filtered out, settings are as follows:
Add the fields to be updated and set their field value: update the related information in the order records to the corresponding information in the trigger data, and it will assign the following subfields with subfields of the trigger data.
- Order Details.Amount equals Trigger Data--Updated Order Details.Amount
- Order Details.Price equals Trigger Data--Updated Order Details.Price
- Order Details.Sum equals Trigger Data--Updated Order Details.Sum
- Total Price equals Trigger Data--Updated Total Price
- Set the relationship between records to be updated and the data source: While updating, multiple Product Details records in the subform of the trigger data will match the corresponding products records in the subform of order records through Product Name and update the field value.
- Order Details.Product Name equals Trigger Data--Updated Order Details.Product Name
Note:
1. It will not update the product records that are not matched in the subform of order records.
2. A record of Product Details in the trigger data can match multiple product records in the subform of order records and update them, namely a record of subform can update multiple subform records in another form, but it still has limits for the amount of records updated, for details, see Update Record Nodes.
Save and Enable
After all the settings, click Save and Enable and put Automation Pro into actual use, as shown in the following picture:
Notes
1. It is not currently supported to delete subform records through subform.
2. While updating records, you can refer to Subform Assignment Rules to see assignment rules for subforms.
3. In the Automation Pro that uses subform to update subform records, you can update the main field and subform records at the same time.