Writing a Statement with the Expression Editor

Prev Next

When writing an action rule, the Expression Editor is used to define the following options:

  • The value being set by “Set field’s value” and “Set field’s multiple value”

  • Inputs when calling a Web Service or SQL Query

  • Inputs when creating a Data Table (covered in a later section)

Here is an example form, with a text box called City, a text box called State, and a number input called ZIP.

An action rule can be written for the button that combines these three values into part of an address (such as Washington, District of Columbia 20001), then sets it as label_1’s value. A basic version of this expression is created by chaining two “+” symbols together. When working with text values, the “+” symbol concatenates the two values, and when working with numbers, it will perform arithmetic.

  1. An Expression is created to add the three fields together. At the moment, this Expression doesn’t work, because the ZIP field is a number field, while the other two are text fields.

  1. This error can be solved by converting the ZIP field to the correct data type with the IntToString() function.

  1. Finally, in order to format the output, some additional strings, such as an empty space “ “ or a comma “,”, are added with “+” operators to concatenate them.

  1. The expression is then saved by clicking OK, and it appears as the statement in the Rules panel. Shown below is an example of the form in a case folder.