Access User Inputs

After the user enters information into a form and submits the form, you can use the user's inputs in other activities. To access a form's inputs, you use the form's state output in an expression. The state output gives you access to the individual inputs that the user entered in the form. An expression to access the value of a form element looks like this:

=$formID.state.elementID.value

The parts of the expression are:

See also...

Example - Enter an Expression to Access Another Activity’s Output

Access Form Element Items in Expressions

In a form element that has items, each item has a unique key that you can use to access the item.

Item keys are strings. If you configure the items manually in Workflow Designer or you create them using the Get Form Element Items From Features or Get Form Element Items From Collection activity, the topmost item has key "0", the second item has key "1", the third item has key "2", and so on. If you use some other method to create the items, they will have whatever string keys you give them.

For example, to access a List Box's topmost item in an expression:

$form1.state.listBox1.items["0"]

If the items are objects, then you can access the item's properties, such as the item's value property, like this:

$form1.state.listBox1.items["0"].value

Do not confuse the items in a form element with the items in the form element's value. A form element's value has an items array that contains the element's selected item(s). The items in the array are indexed numerically: 0, 1, 2, and so on.

For example, compare the following:

  • Topmost item in a List Box:
  • Value of the topmost item in a List Box:
  • Topmost selected item in a List Box:

$form1.state.listBox1.items["0"]
$form1.state.listBox1.items["0"].value
$form1.state.listBox1.value.items[0]