Introduction
String expressions can be used to visually calculate the values of attributes. A distinction is made between context and function expressions. Context expressions can be understood as input modules. Function expressions can be used to control the logic and mutate the context expressions.Kontext-Expressions
The following context expressions are available:
Name | Description | Parameter | Example |
---|---|---|---|
Asset context | If an asset is assigned to the object, the attributes of the asset can be selected here | Relation Attribut | The primary phone number |
context | All attributes of the current object | The first name of the person | |
FixText | A fixed text | "ITSENSE AG" | |
Iteration | The current iteration of the calculation. If the value cannot be determined unambiguously, the iteration is increased. | ||
Random number | A random number | Minimum Maximum | |
Random number | Random characters from a group of characters | Quantity Drawing group | |
Random bytes | Random bytes | Anzahl |
Functions-Expressions
The following context expressions are available:
Name | Description | Parameter | Example |
---|---|---|---|
NullIf | If the condition and the input value are identical, an empty text is returned. If the input value and the condition are not identical, the input value is used. | When Iteration == 0 DANN "" ANSONSTEN Iteration | |
Date formatting | Formats the input in the specified format | Formatting | d MMM yyyy |
Culture name resolver | Resolves an LCID to a culture name | Standard-Kulturname | |
Only valid characters | Removes all invalid characters | Replace Diacritics A-Z a-z 0-9 Zusätzliche Zeichen | |
Concat | Joins several elements together | Prefix Suffix | Prefix → "_" Input → "Hello" Suffix → "_" Result → "_Hello_" |
Remove double name | Removes double names | Name-Min-Length | Müller-Meier → Müller Bo Tao → Bo Tao (For minimum length 4) Template→ Template |
If-Then-Else | classic If / Then / Else | If Comparative value | |
Lower case letters | Converts the input to lowercase letters | Input → "This is a house" Result → "This is a test" | |
MD5 Hash | Calculates the MD5 hash value of the input | Input → "This is a test" Result → "B112C76D02B5832E8D83B74C102E0CA5" | |
Fill left | Fills the input on the left side with the specified character up to the specified length | Fill character Total length | Fill character→ "-" Total length→ 10 Input → "Hello" Result → "-----Hello" |
Fill right | Fills the input on the right side with the specified character up to the specified length. | Fill character Total length | Fill character→ "-" Total length→ 10 Input → "Hello" Result → "Hello-----" |
Password | Generates a password | Length Drawing group(1-6) Seed | Length→ 8 Drawing group 1 → "ABCD" Drawing group 2 → "1234" Result → "AC4D22AB" |
RegexReplace | Replaces the specified pattern with the specified replacements in the input | Pattern Replacements | Pattern → "T.*t" Replacements → "House" Input → "This is a test" Result → "This is a house" |
Remove umlauts | Removes all umlauts from a text and replaces them with the corresponding equivalent. | "Ä" --> "Ae" | |
Replace | Simple Find / Replace | Old value New value | Alter Wert → "Test" New value → "House" Input → "This is a test" Result → "This is a house" |
Substring | Cuts the input to the desired length | StartIndex Max. length | StartIndex → 0 Max. length→ 7 Input → "This is a test" Result → "This is" |
Capital letters | Converts the input to uppercase letters | Input → "This is a test" Result → "THIS IS A TEST" |
Example
The following example shows how to generate a user name from first and last name which follows the following rule:Erstes Zeichen Vorname
At least four characters of the double name exempt surname
Maximum 14 characters in lower case
If the user name is already assigned, a numbering is to take place