Overview
Sometimes, users may want to capture records for a list by capturing information contained in a group, and adding them directly to a list on the form. This can be done in a multitude of ways, but this article outlines how this is done via a process button (transaction controlling a process button).
How to insert rows into an array using a process button
To add rows into an array, the data is inserted into a list control via a workflow transaction. Images of this process can be seen below
Form Steps:
Navigate to the form editor in the designer
Add a section and add all required fields for data you’d like to capture
Drag a list control onto the form and add the fields from the section above that you’d like to be inserted into the rows
Navigate to the workflow editor in the designer
Add a circular transaction to your workflow - this will be the transition used to submit the image.
Circular transition - transition (transaction) that starts and ends with the same status
In the workflow dialogue, add a section and within it add all fields for data you’d like to be moved from the input section into the array
Add an initial calculation for each of the fields that maps to the field on the form
Add a form update “for each in array”, mapping your workflow dialogue group into the array on the form
Duplicate the first section from the dialog and change all of the field initial values to "unset"
Add another form update to update each field on the form with the “unset” field so the values are blanked out
Add a process button to your form and link it to you workflow transition from Step 5.
NOTE: This can also be done by using a Workflow Transition button which can be placed on the form if the addition of the record doesn't need to be completed using a traditional process button. To do this, simply connect the Transaction that contains the form updates and link it to a Workflow Button on the form
Steps 1-3
Steps 4-5
Steps 6-7
Step 8
Step 9-10
Step 11
Navigate to the Inbox to test this form and view the process button:
Alternate Option for Adding Row
Instead of connecting the integration action to the transaction/transition, a user has the capability to override the "+ Add Row" button on the list. To perform this, follow these steps:
Select the List
Navigate to control property section
Find the "Conditions" area
Click the dropdown for the "Add Transition" and select the transition/transaction that will perform the adding