Page tree
Skip to end of metadata
Go to start of metadata

Each form record has a special field that can store a custom state (a runtime state). When user starts the form and form record is created, the value of this field is "NEW". The field stays the same when the form is submitted.

You can use a runtime state for your business purposes. For example, if you need to count forms in progress, (forms that are started but not yet submitted by user) you can assign "SUBMITTED" as runtime state on form submission, then the forms that still have state "NEW" are the forms in progress. Or a form can be designed for multiple purposes and on submit you assign the purpose it was used by user to a runtime state, so you can do further processing of form's data based on this state.

This assignment can be done using REST API or via form workflows. To change a form state two types of workflows can be used (see Managing Workflows to learn how to add, edit and remove workflows).

Workflow 1. Assign form state

This workflow assigns the runtime state to a value specified in the workflow's "State Name" property on the selected event type.


Workflow Property NameDescription
State name

A runtime state value to be assigned.

Workflow 2. Assign form state from field value

This workflow assigns the runtime state as a value that is retrieved from a form field whose name you specify in the workflow's "Field" property. 

E.g. for a Service Request form you want to differentiate form records by service type. The form has a Combobox Field with the name "service.type" where user selects service type. If you set the workflow's "Field" property to be "service.type" and select "On Form Submit" event type, then when user submits the form, its record state will have the value of the service type the user selected.


Workflow Property NameDescription
Field

Name of the form component that contains a runtime state value to be assigned.

See Change runtime state via REST API to learn another way of changing form state.

 

  • No labels