Introduction
Tip:
To better understand how Expressions work, check out the Use Expressions page in the How To section.
Expressions are comprised of several operations allowing you to transform, modify, and compute the data within an app in order to return an output result. Expressions can be used in several scenarios, such as:
- Bind to variables, process output, and other control values from the resources panel.
- Concatenate strings using the
&
symbol. - Perform comparative operations.
- Create logical operators within comparative operations.
- Set control values through the
If
function added to comparative operations. - Perform arithmetic operations with the help of expressions.
- Declare static data such as "String", true/false, 123, etc or static lists of primitives such as a list of strings.
- Control hidden, disabled, font/background color properties.
- Reference a selected record or field on a record from another control.
Configuring expressions
The following operations can be used when configuring expressions:
- Functions
- Named Operators
Functions
The following functions are made available for Apps:
Function | Description |
---|---|
And, Or, Not | The And function returns true if all arguments are true. The Or function returns true if any of the arguments are true. The Not function returns true if its arguments is false, and returns false if its argument is true. |
Concat | Combines multiple strings into a single string |
Contains | Returns true if a string contains a text fragment. |
EndsWith | Returns true if a string ends with a text fragment. |
If | Returns one value if a condition is true and another value if not. |
IsBlank | Checks for a blank value. |
Length | Returns the length of a text string. |
List | Create a static list of values from one or more pieces of text in order to further use it in other lists or dropdowns |
StartsWith | Returns true if a string starts with a text fragment. |
Sum | Sum a specific column in a table or custom list control. |
Sort | Sort the information from a source based on its fields. |
Now | Return the current date and time in your time zone. |
Today | Return the current date in your time zone. |
Time | Return the current time in your time zone. |
Year | Return the year component of a Date/Time value. |
Month | Return the month component of a Date/Time value. |
Day | Return the day component of a Date/Time value. |
Hour | Return the hour component of a Date/Time value. |
Minute | Return the minute component of a Date/Time value. |
New | Create a new in-memory entity. |
Lookup | Find and return the first record in a table that satisfies a formula or condition. |
Filter | Filter a table based on its fields. |
Operators
In addition to functions, Apps expressions also supports mathematical and conditional operators. For supported operators, see the table below.
Category | Operator |
---|---|
Additive expression | + , - |
Atomic expression | () , Literal, Variable, Functions |
Comparison expression | < , <= , > , >= , in |
Concatenation expression | & |
Equality expression | == , != |
Exponentiation expression | ^ |
Logical expression | && , and , AND , | | , or , OR |
Multiplicative expression | * , / , % |
Unary expression | ! , not , NOT , unary + , unary - |
Where can expressions be used
Expressions can be used for the following:
- Controls
- Rules
Controls
Expressions are enabled for hidden and disabled properties for the following controls and their display values:
- Button - Text (icon not supported)
- Checkbox - Label, Checked
- DatePicker - Hint Text
- Dropdown - Hint Text, Default Selected
- Switch - Label, On
- Text Area - Default Text, Hint Text
- Textbox - Default Text, Hint Text
- Label - Text
- Header - Text
- Image - URL
Note:
When used on control properties, expressions are re-evaluated at runtime if any of their dependent values changes.
Rules
Rules are used to enable conditional logic. You can use expressions on the following rules:
- If - Compare, Group
- Open URL - URL
- Show Message - Title, Message
- Show/hide spinner - Message
- Start process - Input override
- Set Value - Value
Note:
Expressions are not reevaluated continuously when used in rules, only at the time that the rule is triggered.
Updated about 21 hours ago
See Also
Using Expressions |
About Functions |