Inside Activate
Activate Expressions
Introduction to Activate Expressions
4 min
activate expressions are a built in expression language used throughout activate to dynamically evaluate values at runtime they allow configuration to adapt based on context — such as the current user, job data, system state, or configuration values — without the need for custom code or scripting expressions are used anywhere activate needs to make a decision, transform data, or generate dynamic output common uses include conditional logic in web forms, controlling workflow behaviour, formatting values in notifications, and validating or comparing data during execution at their core, activate expressions read values from the activate data model (for example, users, jobs, roles, or system properties) apply logic such as comparisons, conditions, and boolean checks transform or format data, including dates, strings, and lists return a value that activate can use to control behaviour or display information expression syntax all activate expressions start with an equals sign (=) this tells activate to evaluate the value as an expression rather than treat it as a static string depending on where an expression is used, you will often see it wrapped in percent signs (%) wrapping an expression in % tells the interpreter to resolve the expression and substitute the result into the surrounding text for example the user who is submitted this job is %=//job/submituser/displayname% this resolves the expression and inserts the display name of the user who submitted the current job expressions can also be used without % when the entire value is expected to be an expression result, such as in boolean conditions or configuration parameters expressions can reference data using paths, call built in functions, or combine both to produce a result they are evaluated at runtime within the context in which they are used, such as a web form, workflow, or notification for example \=if(=/user/isdisabled, "disabled", "active") this expression checks whether the current user is disabled and returns a corresponding value design principles activate expressions are intentionally concise and declarative they are designed to be readable, reusable, and safe to use within configuration, making them a powerful tool for extending activate behaviour while keeping implementations consistent and maintainable