eADM
Breadcrumbs

Using Function Expressions and Dynamic Variables in eADM

In eADM, you can use dynamic variables when configuring rulesets, message templates, and export templates. A dynamic variable is a placeholder that is replaced with a generated value when a rule or template is executed.



What are dynamic variables?

A dynamic variable can be either an attribute or a function.

  • Attribute: Refers directly to the value of an attribute on an object (e.g., a user's first name).

  • Function: Takes one or more parameters and generates a new value based on them. Parameters can be static text, numbers, or even other dynamic variables.

The available attributes are determined by the object type (user, group, or department), although some attributes are common to multiple types.


Note:

  • First Name is available only for user objects.

  • Name is available for group and department objects (but not users).

  • Description is available for all object types.



How to Use Dynamic Variables

You can insert dynamic variables using a dropdown menu or by typing directly into a text field. For example, you can select a department number as Department Number from a dropdown menu or typed as [DepartmentNumber] in a text field.


Text Format

In any supported text field, you can manually add a dynamic variable.

  1. Type an opening square bracket [ to begin. The closing bracket] will be added automatically.

  2. With the cursor between the brackets, a list of available variables will appear.

  3. The list is sorted alphabetically and filters as you type. For example, typing "dep" will display all variables that contain that text.

  4. Use the and arrow keys and Enter to select a variable, or scroll and click with the mouse. Press Esc to close the list.


Warning: When using the text format, all dynamic variables must be enclosed in square brackets []. Functions must must always be written in plain text and enclosed in square brackets [].

Examples:

  • Attribute: [first name]

  • Function: [IFEMPTYUSE;[workphone];[mobile]]


Expressions

An expression is a text string that combines one or more dynamic variables with static text to produce a single result. Expressions can range from simple to highly complex.

Expression

Description

Example of Generated Value

[first name]

A single attribute.

Kari

[first name] [last name]

Two attributes separated by a space.

Kari Nordmann

Hello, [first name] [last name]!

Static text combined with two attributes.

Hello, Kari Nordmann!

[LOWER;[firstname]]

A function that takes a single attribute as its parameter.

Kari

[SUBSTRING;0;3;[givenname]]

A function with multiple parameters, including an attribute.

Tub

[LOWER;[SUBSTRING;0;3;[givenname]][SUBSTRING;0;3;[surname]]]

A nested expression using multiple functions and attributes.

horns


The Expression Builder

To create complex expressions with nested functions or to test how an expression will behave, you can use the Expression Builder. It is available for any text field that supports dynamic variables, as indicated by a button next to the field.

The Expression Builder includes the following tools:

  • Expression: A text field for building your expression, with full support for the autocomplete functionality described above.

  • Discard changes: A button that reverts any edits made since the builder was opened.

  • Evaluation: A preview pane displaying the generated output of the expression for a selected object.

  • Select [Object]: Opens a dialog box to search for and select a specific object (e.g., a user) to use for the evaluation.

  • Select random [Object]: Automatically selects a random object of the correct type to use for the evaluation.