ProcessMaker API Documentation
Script Central

Expression Syntax Components for "Visibility Rule" Control Settings

Use this expression syntax to determine how controls in your ProcessMaker Screen show or hide in run-time.

Expression Syntax Components for "Visibility Rule" Control Settings

Use the following expression syntax components to compose the expression that describes under which condition(s) a ProcessMaker Screen control displays.

If an expression in a control evaluates as True, then that control displays during a Request. If an expression in a control does not evaluate as True, then that control does not display during a Request.

Spaces are allowed before and after expression components, such as arithmetic and comparison operators, to more easily read the expression.

Combine expressions using logical operators. Example: (not approved) or (cost > 500).

First Rule for the Visibility Rule Setting

If a ProcessMaker Screen control does not have an expression in its Visibility Rule setting, then that control displays by default.

Magic Variables

‚ÄčMagic Variables can be used in when composing expressions.

Literals

Component

Syntax

Expression Example

string

"hello" or 'hello'

FullNameInput == "Louis Canera"

number

100

cost > 500

array

[value1, value2]

myFruit not in ["apples", "oranges"]

Boolean

true and false

directorSigned

Arithmetic Operations

Component

Syntax

addition

+

subtraction

-

multiplication

*

division

/

Logical Operators

Component

Syntax

not

not

and

and

or

or

Consider the following example common for Select List controls configured to allow multiple selections. Suppose a Select List control with a Variable Name setting of SelectListControl has the following options:

  • Beatty

  • Fred

  • Nancy

  • Tom

To configure another control in that ProcessMaker Screen to remain hidden if the Fred option is not among the selections, use the following expression in the Visibility Rule setting for the control that is to remain hidden:

not("Fred" in SelectListControl)

Comparison Operators

Component

Syntax

equal to

==

not equal to

!=

less than

<

greater than

>

less than or equal to

<=

greater than or equal to

>=

String Operator

Component

Syntax

concatenate matches

~

Array Operators

Component

Syntax

contains

in

does not contain

not in

Consider the following example common for Select List controls configured to allow multiple selections. Suppose a Select List control with a Variable Name setting of SelectListControl has the following options:

  • Beatty

  • Fred

  • Nancy

  • Tom

To configure another control in that ProcessMaker Screen to remain hidden if the Fred option is not among the selections, use the following expression in the Visibility Rule setting for the control that is to remain hidden:

not("Fred" in SelectListControl)

Range

Component

Syntax

Example

range

..

foo in 1..10

Related Topics