List expressions

Updated 4 weeks ago by Neil

Fields

The following fields use a list data type:

  • Dropdown
  • Checkbox/multi-select
  • Checklist

This expression generates a user list:

Lastcompletedstep().assignees()

Example fields

Field ID

Field type

Possible values

Selected values

Regions

Checkbox

Americas, EMEA, Asia Pacific

EMEA, Asia Pacific

Methods

Methods come after the field ID and are called up with a dot operator.

Function

Field type

Description

Syntax

Output

has

Boolean

TRUE if the value was selected

FALSE if it wasn't

Regions.has(“EMEA”)

True

hasall

Boolean

TRUE if all the values were selected

FALSE if any values are missing

Regions.hasAll(“Americas","EMEA")

False

length

Number

Shows the number of items selected

Regions.length()

2

get

Text

Shows a specific list option

Regions.get(2)

Asia Pacific

concatenate

Text

Shows all the selected values in a string

You can specify the joiner.

Regions.concatenate()

Regions.concatenate(", ")

EMEA,Asia Pacific

EMEA, Asia Pacific


How did we do?