Introduction to expressions and formulas
Expressions are used in Kissflow to create formulas and settings for fields and steps.
The importance of data types
Expressions in Kissflow are strongly typed to the data type you are working with. Functions, methods, fields, and operators will only work with the correct data type. If you have trouble with an expression, always start with examining the data type.
Every field type is associated with a particular data type.
Text, TextArea, Dropdown
Number, Rating, Slider
May 29, 1970
May 29, 1970 3:30pm
Boolean (i.e. true/false)
Multi select user
- Aggregation fields can change their type based on the field they are evaluating. They can be either a text, number, currency, date, or datetime.
- Remote Lookup fields will be either text or JSON.
- There are no data types associated with image, attachment, rich text, or signature fields. You cannot use these fields in expressions.
Detailed expression tips based on data type
Because expressions are so connected to the data type, we’ve separated the instructions for creating expressions based on the data type.
- Text expressions
- Number and currency expressions
- Date expressions
- IF function
- Logical expressions
- User expressions
- Workflow step expressions
- List expressions
Parts of an expression
Expressions can be made up of fields, functions, methods, and operators.
You can use any field on your form that has a data type associated with it. When using a field, you must use the field ID in the expression.
You can also use system fields that Kissflow automatically collects data about.
Functions and methods
Functions and methods allow you to act on data. A function comes first in an expression, whereas a method is called up after mentioning the field.
Every function has a specified number of parameters associated with it. For example, with an IF function, there are three parameters: the condition you are testing for, the value you display if it is true, and the value you display if it is false.
IF(Order_total>5000, ”Yes”, ”No”)
An operator is used to show how different parts of the expression should be evaluated or connected. You can see a list of available operators depending on the field type you select.
Where can I use expressions?
1. Form field formulas
You can use expressions as a part of a formula for calculating a field in your form. Form fields can display all data types except for Boolean.
2. Step conditions
You can use an expression to determine when a workflow step or branch happens.
These expressions must be Boolean. If the result is TRUE, the step or branch will happen. If it is FALSE, the step is skipped.
3. Assigning a user to a step
You can use an expression to assign a step to a user.
These expressions must result in a User data type.
4. Deadline times and messages
You can use an expression to define how many hours until a step crosses a deadline.
This expression must be either a number or datetime data type.
You can also use an expression to define whom a notification or escalation message is sent to when a deadline is crossed.
This must be a user data type.