Please enable JavaScript to view this site.

Version:

Navigation: Forms

Access User Inputs

Prev Top Next More

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:

formID: The ID of the form from which you want to access a user input.

state: A form's state output gives you access to the individual inputs that the user entered in the form.

elementID: The ID of the individual form element that you want to access.

value: The value that the user entered into the element.

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]

© 2024 VertiGIS North America Ltd. All Rights Reserved. | Privacy Center | Imprint
Documentation Version 5.42 (220a4365)