Skip to main content
Skip table of contents

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), though some attributes are common across multiple types.

Note:

  • GivenName is only available 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 in a text field. For example, a department number can be selected as DepartmentNumber from a dropdown 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 show all variables containing 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 always be written in text format and enclosed in square brackets [].

Examples:

  • Attribute: [givenname]

  • 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 output. Expressions can range from simple to highly advanced.

Expression

Description

Example of Generated Value

[givenname]

A single attribute.

Kari

[givenname] [surname]

Two attributes separated by a space.

Kari Nordmann

Hello, [givenname] [surname]!

Static text combined with two attributes.

Hello, Kari Nordmann!

[LOWER;[givenname]]

A function with one attribute as its parameter.

kari

[SUBSTRING;0;3;[givenname]]

A function with multiple parameters, including an attribute.

Kar

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

A nested expression using multiple functions and attributes.

karnor

The Expression Builder

For creating complex expressions with nested functions or for testing how an expression will behave, you can use the Expression Builder. It is available for any text field that supports dynamic variables, 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 showing the generated output of the expression for a selected object.

  • Select [Object]: Opens a dialog 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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.