Funktion lausekkeiden ja dynaamisten muuttujien käyttö eADM:ssä
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.
Huom:
GivenName
is only available for user objects.Nimi
is available for group and department objects (but not users).Kuvaus
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.
Type an opening square bracket
[
to begin. The closing bracket]
will be added automatically.With the cursor between the brackets, a list of available variables will appear.
The list is sorted alphabetically and filters as you type. For example, typing "dep" will show all variables containing that text.
Käytä
↑
ja↓
arrow keys andEnter
to select a variable, or scroll and click with the mouse. PressEsc
to close the list.
Varoitus: When using the text format, all dynamic variables on be enclosed in square brackets []
. Functions on always be written in text format and enclosed in square brackets []
.
Examples:
Attribuutti:
[givenname]
Toiminto:
[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.
Ilmaisu | Kuvaus | Example of Generated Value |
---|---|---|
| A single attribute. |
|
| Two attributes separated by a space. |
|
| Static text combined with two attributes. |
|
| A function with one attribute as its parameter. |
|
| A function with multiple parameters, including an attribute. |
|
| A nested expression using multiple functions and attributes. |
|
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.