Appearance
Settings and expressions
Expression settings
An expression settings package holds named values for an environment: URLs, user names, limits, secrets. Flows refer to the values by name, so the same flow runs in test and production with each environment's own values.
Create a package
- Open the
/usr/configfolder. - Click Add expression settings.
- Give the package a Settings name, such as
Crm. - Click Add for each value and set its Name and Value.
- Save.
Switch on protection for a value to let only the package's author and administrators change it. Other users see the value masked, and their flows still use it.
Use a setting
Type = in an empty text or number field and choose Settings. Pick the package and the value; the field then reads =Crm.ApiUrl. At run time the field gets the value from the environment the flow runs in.
Scripts read settings with Services.Settings.Get("Crm", "ApiUrl").
The expression builder
The expression builder builds a component's field value from the record, the metadata and the flow configuration, for every record. Type = in a field and choose Expression.
text
Order {input.Id} for {meta.SessionId}Text in braces is a binding:
| Binding | Value |
|---|---|
{input.Field} | A field of the incoming record |
{meta.Field} | A field of the message metadata |
{config.Field} | A field of the flow configuration |
{settings("Crm.ApiUrl")} | An expression setting |
Write {{ and }} for literal braces.
The Fields panel lists the input, metadata and configuration fields: double-click one to insert it. The Functions panel inserts functions for text (upper, lower, trim, left, replace, format), numbers (round, floor, min, max) and dates (now, today, addDays, daysBetween).
The builder checks the expression as you type and lists any problems with their position. The value is computed before each call of the component.