Skip to main content

Using the Set Variables Step to Change the Value of the Status Field

Bind two list-form actions to confirmation icons, set the current record's Status field, and verify the saved change.

Use Set variables in a list form to change the status of the record the user is viewing or editing. For example, a task form can let the user mark the task finished or reopen it.


Example: Changing the Status Field Value by Toggling a Confirmation Icon

Use one action for the confirmation icon and another for the undo icon. Both target the same Status field. Before you build the actions, check the values configured in your data list for the two statuses. Use finish and open if those are the actual values in your list.


Steps:

Step 1: Create the “Change to Finish” Action

  1. Open the list form in the designer and select Actions.

  2. Select New action and name it Change to Finish.

  3. Select Add a step, then Set variables.

Step 2: Configure the Set variables step

  1. Choose Single Value to set one field. Use Multiple Values when a step should assign several variables or fields. Set Variables Step

  2. In Variable, open the expression editor and choose Status under List Fields for the current record.

  3. In Value, enter the configured value for the finished status. The example uses finish.

  4. If the step should run only in certain cases, set an Execution Condition. Enable Continue next step when condition is not met only if the later steps should still run when this assignment is skipped. Execution Condition of actions

The Set variables step uses Single Value with List Fields:Status selected and finish in the Value field.

Step 3: Bind the Action

Select the confirmation icon in the form and open its Action settings. Set Execute type to Action, then select Change to Finish.

Step 4: Create the "Change to Open" Action

Create Change to Open with another Set variables step. Choose Single Value, select the same Status field, and enter the configured value for the open status. Bind the undo icon to this action using the same Execute type setting.

Test both directions on a sample record. After each change, save the form and reopen the record to verify the stored status. If an icon should save immediately, add Submit Form with Submit type set to Save after Set variables. If saving depends on a condition, apply that condition to the submit step too. Using Form Actions to save changes to list fields

Did this answer your question?