Form Updates

Form Updates



Understanding Form Updates

Use form updates in your form’s workflow to update form fields automatically during a transition. 

There are two types of form updates:

  1. Set form field: Use this type to update the value of one non-array component (i.e. a checkbox, text/number input, etc.) on your form
  2. Append to form field array: Use this type to add a row to an array (i.e. a list, grid, table, etc.)

Here are examples of when it would be useful to utilize form updates:

Use Case

How to utilize form updates

You want to have a checkbox or some component on your form that tracks if a transition was run, like if a transition to create another form was run.

Add one form update to the transition. The form update will set the checkbox on the form from a hidden checkbox field in the transition dialog. Use an initial calculation on the checkbox in the dialog.

You want to provide the form user with a button through which they can add a row to a list, like a list of passdown notes or a list of damaged components.

Create a transition and either keep “show button” on or link it to a transition button component on the form. In the transition, add one form update to append a row to the array.


Status

By default, you’ll see one form update that sets the form status from the transition status. Don’t delete this! This form update will automatically update based on your changes in chart mode and is there to update the form’s status.


Set Form Field

Example: I have a checkbox, “Created”, on my form. I also have a “Create Form” button on my form that runs a transition which creates a separate form. When the user clicks “Create Form”, I want “Created” to update to true so that anyone looking at this form can see if the “Create Form” button has been clicked yet or not.

In the Designer, I would follow the below steps:

  1. Select your transition
  2. Add a checkbox to your transition’s dialog (“checkbox-1”)
  1. You can hide this checkbox
  1. Set the initial calculation to true for “checkbox-1” in the right panel
  2. Click + under FORM UPDATES 
  3. Click  next to Set and select the “Created” checkbox that’s on your form
  4. Click  next to From and select “checkbox-1” that’s on your transition’s dialog
  5. Click OK

Now, whenever this transition is run in the Inbox, the “Created” checkbox will be automatically set to true.


Append to Form Field Array

Example: I have the below list on my form that holds passdown notes. I want to provide form users a button to add a passdown note to this list.

In the Designer, I would follow the below steps:

  1. Create a new transition
  2. In the transition dialog, add a section field (“group-1”)
  3. Inside the section, re-create the component types and names that are in the list on the form
  1. For example, this list has a text input “added-by”, a datetime input “added-at”, and a text input “note”. I need to add all three of those component types to the group in the dialog and ensure they have the same names.
  1. Use the initial calculation in the right panel to set initial values if the value isn’t coming from user input
  1. In this example, “Added By” and “Added At” are hidden and automated using initial value calculations
  1. Click under FORM UPDATES 
  2. Click  next to Set and select the passdown notes list that’s on your form
  3. Click  next to From and select the section/group that’s on your transition’s dialog
  4. Click OK

Now, whenever this “Pass Down Note” transition is run in the Inbox, the user can provide notes and then a row will be added to the Pass Down Notes list: