Skip to content

Value modification rules – reference

This page lists every rule of the Modify Value expression with its parameters. The rule names and parameter names are shown exactly as in the editor: the rule is chosen in "Type", its parameters appear below it.


1. Rules at a glance

Group Rules
Extracting text TextAfter, TextBefore, TextBetween, TextAfterUntilEndOfLine, TextBeforeFromStartOfLine, NextWord, PreviousWord, NextNumber, PreviousNumber, FirstWord, LastWord, FirstNumber, LastNumber, Left, Right, Substring, IndexOf, TextLength, RegexFirstMatch
Changing text Replace, ReplaceCased, RegexReplace, Remove, ToUpper, ToLower, UpperCaseFirst, Trim, TrimStart, TrimEnd, PadLeft, PadRight, EllipseText, AppendLine, PrependLine, RemoveLastLine, RemoveLine, RemoveCarriageReturns, RemoveLineBreaks, RemoveWhiteSpace, HtmlToPlainText, MarkdownToHtml
Tests and decisions Contains, ContainsCased, StartsWith, StartsWithCased, EndsWith, EndsWithCased, TextEquals, TextEqualsCased, IsEmpty, RegexIsMatch, ContainsNumber, IsValidDate, IsValidTime, IsValidDateTime, TextToLogical, Not, Coalesce, Conditional
Numbers MathRound, MathAbsolute, MathTruncate, MathCeiling, MathFloor, MathAppendFormula, MathPrependFormula, NumberFormat, SecondsToTimeFormat
Dates and times DateTimeFormat, DateTimeParse, DateTimeAdd, DateTimeDiff, ConvertTimeZone, DateTimeFirstOfYear, DateTimeFirstOfMonth, DateTimeFirstOfWeek, DateTimeLastOfYear, DateTimeLastOfMonth, DateTimeLastOfWeek, UnixTimestampToDateTime, DateTimeToUnixTimestamp, HumanizeTimestamp, IsDateWithInBusinessHours, IsDateTimeWithInBusinessHours
Reading JSON JObjectJsonPathValue, JObjectJsonPathArray, JObjectFindElement, JObjectPropertyNameAt, JObjectKeys, JArrayJsonPathValue, JArrayJsonPathArray, JArrayElementAt, JArrayFirstElement, JArrayLastElement, JArrayLength, JArrayHasElements, JArrayContains, JArraySum, JArrayMin, JArrayMax, JArrayAverage
Building JSON and lists JObjectSetProperty, JObjectRemoveProperty, JObjectMerge, JArrayAppend, ConcatJArray, JArrayRemoveAt, JArraySort, JArrayDistinct, JArrayReverse, SplitStringJsonArray, SplitStringJsonArrayKeepEmpty, SplitLines, JoinJArray, RegexToJArray, CsvToJArray, JArrayToCsv
XML XObjectFindElement, XObjectFindElementWithAttribute, XObjectFindElementWithAttributeValue, XObjectGetAttributeValue, XObjectXPathValue, XObjectXPathArray, XArrayXPathValue, XArrayXPathArray, XArrayLength, XArrayFindElementAt, XArrayFirstElement, XArrayLastElement, XArrayHasElements, XmlToJson, JsonToXml
Encoding JsonEncode, JsonDecode, EncodeBase64, DecodeBase64, Base64ToHex, HexToBase64, UrlEncode, UrlDecode, HtmlEncode, HtmlDecode, EncodeBackslashCrLf, DecodeBackslashCrLf, EncodeBackslashQuote, DecodeBackslashQuote
Hashing and encryption HashSha1, HashSha256, HashSha512, HashMd5, HashHmacSha1, HashHmacSha256, HashHmacSha512, HashHmacMd5, EncryptAes256, DecryptAes256
Users, groups and definitions UserNameFromId, CurrentUserHasRole, GetGroupMembers, IsMemberOfGroup, DefNameFromId, DefIdFromDefName, FieldNameFromId, FieldIdFromName

General rules

  • Each rule works on the result of the rule before it (see Modify Value).
  • Every parameter is an expression. For a fixed value, type it directly into the parameter. A parameter left empty counts as an empty text.
  • "Ignoring case" means that upper and lower case do not matter when searching.
  • Rules that test something return true or false.
  • If a rule fails with an error, the whole expression returns an empty value. Where a rule instead leaves the value unchanged, this is stated below.
  • Numbers in parameters and values are written with a decimal point. Positions ("index") start at 0.

2. Extracting text

Rule Result Parameters
TextAfter Everything after the first occurrence of a text, searched ignoring case. Empty if the text does not occur. TextBefore – the text to search for
TextBefore Everything before the first occurrence of a text, ignoring case. Empty if the text does not occur. TextAfter – the text to search for
TextBetween Everything between two texts. The start text is searched ignoring case, the end text after it including case. Empty if one of them does not occur. For an optional end, use TextAfter followed by TextBefore. TextBefore – start text; TextAfter – end text
TextAfterUntilEndOfLine Everything after a text up to the end of that line; empty if the text does not occur. The usual way to read "Label: value" lines from an e-mail. TextBefore – the text to search for, ignoring case
TextBeforeFromStartOfLine Everything from the start of the line up to a text; empty if the text does not occur TextAfter – the text to search for, ignoring case
NextWord The word that follows a text TextBefore – the text to search for, ignoring case
PreviousWord The word that precedes a text; empty if the text does not occur TextAfter – the text to search for, ignoring case
NextNumber The number (optionally negative, with decimal point) that follows a text; empty if there is none TextBefore – the text to search for, ignoring case
PreviousNumber The number that precedes a text; empty if there is none TextAfter – the text to search for, ignoring case
FirstWord The first word (words are separated by spaces only) –
LastWord The last word (separated by spaces only) –
FirstNumber The first run of digits (whole digits only, no sign, no decimals). Without any digit the value stays unchanged. –
LastNumber The last run of digits. Without any digit the value stays unchanged. –
Left The first characters; the whole value if it is shorter. A length that is not a whole number leaves the value unchanged. Length – number of characters
Right The last characters; the whole value if it is shorter Length – number of characters
Substring A part of the value. A range beyond the end is cut off; a start beyond the end gives an empty value. A missing or 0 length gives an empty value. StartIndex – start position (from 0); Length – number of characters
IndexOf The position of the first occurrence of a text (from 0, including case); -1 if it does not occur SearchText
TextLength The number of characters –
RegexFirstMatch The first match of a regular expression (.NET syntax), or one group of it by name or number. Empty if nothing matches or the pattern is invalid. For all matches use RegexToJArray. Pattern; Group – may be empty for the whole match

3. Changing text

Rule Result Parameters
Replace Replaces every occurrence of a text, ignoring case. An empty search text leaves the value unchanged. OldText; NewText – may be empty to delete
ReplaceCased Like Replace, but including case OldText; NewText
RegexReplace Replaces every match of a regular expression (.NET syntax). The replacement can insert groups: $1, $2, ${name}, $0 for the whole match. Without a match or with an invalid pattern the value stays unchanged. Pattern (required); Replacement – may be empty to delete the matches
Remove Removes every occurrence of a text, ignoring case. An empty text leaves the value unchanged. Value
ToUpper The value in upper case –
ToLower The value in lower case –
UpperCaseFirst The first character in upper case, the rest unchanged –
Trim Removes spaces, tabs and line breaks at both ends –
TrimStart Removes characters at the start. Every character listed is removed (a set, not a sequence: 0 removes leading zeros and spaces). Empty removes whitespace. Characters
TrimEnd Removes characters at the end, like TrimStart Characters
PadLeft Fills the value at the front up to a total length, for example 7 → 007. Only the first character of PadChar is used; an empty PadChar leaves the value unchanged. A TotalWidth of 0 gives an empty value; one that is not a whole number leaves the value unchanged. PadChar; TotalWidth
PadRight Fills the value at the end, like PadLeft PadChar; TotalWidth
EllipseText Shortens the value to a maximum length; the last three characters become .... Shorter values stay unchanged. Below 4 the value is just cut. A negative or non-numeric length leaves the value unchanged. MaxLength
AppendLine Adds a text as a new line at the end Value
PrependLine Adds a text as a new line at the front Value
RemoveLastLine Removes the last line. A value with a single line becomes empty. –
RemoveLine Removes the line at a position (from 0). A position beyond the end changes nothing. LineIndex
RemoveCarriageReturns Removes carriage return characters and keeps the line feeds –
RemoveLineBreaks Removes all line breaks; the lines are joined without a space –
RemoveWhiteSpace Removes all spaces, tabs and line breaks –
HtmlToPlainText Removes the HTML markup and keeps the readable text – for putting a rich text field into a plain text e-mail –
MarkdownToHtml Converts Markdown into HTML, for example an AI answer for a rich text field or an HTML e-mail. HTML contained in the Markdown is escaped, not passed through. –

4. Tests and decisions

Rule Result Parameters
Contains Whether the value contains a text, ignoring case. An empty search text always gives true. Value
ContainsCased Whether the value contains a text, including case Value
StartsWith Whether the value starts with a text, ignoring case Value
StartsWithCased Like StartsWith, but including case Value
EndsWith Whether the value ends with a text, ignoring case Value
EndsWithCased Like EndsWith, but including case Value
TextEquals Whether the value is exactly the text, ignoring case. Spaces count – use Trim before if needed. Value
TextEqualsCased Like TextEquals, but including case Value
IsEmpty Whether the value is empty or contains only spaces –
RegexIsMatch Whether a regular expression (.NET syntax) matches anywhere in the value; use ^ and $ to test the whole value. false for an invalid pattern. Pattern
ContainsNumber Whether the value contains a digit –
IsValidDate Whether the value can be read as a date – a date value or text in a culture-neutral format such as 2026-05-31 (not 31.05.2026) –
IsValidTime Whether the value can be read as a time, for example 14:30 –
IsValidDateTime Whether the value can be read as date and time, for example 2026-05-31T14:30:00 or 2026-05-31 14:30 –
TextToLogical Converts yes, ja, 1 to true and no, nein, 0 to false (ignoring case). Every other value – including true and false – stays unchanged. –
Not Reverses a yes/no value: true or 1 becomes false, everything else – including an empty value – becomes true –
Coalesce Replaces an empty value with a fallback. A value that is not empty stays unchanged. Value – the fallback
Conditional Returns one of two values, depending on whether the current value is true (true or 1, ignoring case). A missing value gives an empty result. Handy after a test such as Contains; for more than two outcomes use a Case expression. TrueValue; FalseValue

5. Numbers

Rule Result Parameters
MathRound Rounds the number. If the value is not a number or DecimalPlaces is not a whole number, the value stays unchanged. DecimalPlaces – for example 0 or 2
MathAbsolute The number without its sign –
MathTruncate The number with its decimals cut off, without rounding –
MathCeiling Rounds up to the next whole number (2.1 → 3, -2.1 → -2) –
MathFloor Rounds down to the next whole number (2.9 → 2, -2.1 → -3) –
MathAppendFormula Appends a formula to the value and calculates the result – the value becomes the left side, for example *1.19 or / 60. A formula that cannot be calculated gives an empty value. Same formula syntax as the Mathematic expression. Formula
MathPrependFormula Puts a formula in front of the value and calculates – the value becomes the right side, for example 100 - Formula
NumberFormat Formats a number as text with a decimal point. A value that is not a number stays unchanged. Format – a .NET number format such as 0.00, N2, #,##0 or D5
SecondsToTimeFormat Turns a number of seconds into a time of day (hh:mm:ss). After 24 hours it starts at 0 again, so it only suits durations below one day. –

6. Dates and times

Rule Result Parameters
DateTimeFormat Formats a date or time as text. An empty value stays empty. Format – a .NET format such as yyyy-MM-dd, dd.MM.yyyy HH:mm or o (MM = month, mm = minute)
DateTimeParse Reads a text as a date in a given format or culture, for example 31.05.2024. A text that does not fit gives an empty value – combine with Coalesce for a fallback. Format – for example dd.MM.yyyy or dd.MM.yyyy HH:mm, several separated by \|; may be empty to accept any format of the culture; Culture – for example de-DE; empty for the invariant culture
DateTimeAdd Adds an amount of time; an empty value stays empty. An unknown unit leaves the value unchanged. Value – a whole number, negative to go back; Unit – years/year/yy (counted as 365 days), days/day/dd, hours/hour/hh, minutes/minute/mm, seconds/second/ss, milliseconds/millisecond/ms, microseconds/microsecond/mcs
DateTimeDiff The value minus another date, as a number in a unit – positive if the value is later. Years and months count completed calendar units (as for an age); smaller units keep decimals. Empty if one of the two is not a date. OtherDate; Unit – years, months, weeks, days, hours, minutes, seconds or milliseconds (also yy, mo, ww, dd, hh, mm, ss, ms)
ConvertTimeZone Converts a date and time from one time zone into another, including daylight saving time. An unknown time zone leaves the value unchanged. FromTimeZone; ToTimeZone – for example Europe/Berlin; empty means UTC
DateTimeFirstOfYear The first day of the year of the date. A value that is not a date stays unchanged. –
DateTimeFirstOfMonth The first day of the month –
DateTimeFirstOfWeek The first day of the week –
DateTimeLastOfYear The last day of the year –
DateTimeLastOfMonth The last day of the month –
DateTimeLastOfWeek The last day of the week –
UnixTimestampToDateTime Turns a Unix timestamp (whole seconds since 1 January 1970, UTC) into a date and time in UTC. A value with decimals – for example a timestamp in milliseconds – stays unchanged; divide it by 1000 first (MathAppendFormula / 1000, then MathTruncate). –
DateTimeToUnixTimestamp Turns a date and time into a Unix timestamp (whole seconds since 1 January 1970 UTC). A date without time zone counts as UTC. –
HumanizeTimestamp Writes a point in time relative to now, for example "2 hours ago" or "in 3 days" –
IsDateWithInBusinessHours Whether the date is a working day of a business hours calendar; false if the calendar is not found BusinessHours – the id or the name of the calendar
IsDateTimeWithInBusinessHours Whether the point in time lies within the working time of a business hours calendar; false if the calendar is not found BusinessHours – the id or the name of the calendar

DateTimeAdd has no unit for months or weeks – mm means minutes. For calendar months, use the Date Time Math expression.


7. Reading JSON

Rules starting with JObject expect a JSON object ({ … }), rules starting with JArray a JSON array ([ … ]). Choose the rule for the shape the value has at that point of the chain.

Rule Input Result Parameters
JObjectJsonPathValue object A single value at a JSONPath, for example customer.name or $.orders[0].number. A nested object or array comes back as JSON text; no match gives an empty value. Path
JObjectJsonPathArray object All matches of a JSONPath as a JSON array, for example orders or $.orders[*].number Path
JObjectFindElement object The property with the given name at the top level (not searched in nested objects – use JObjectJsonPathValue with ..name for that). Empty if it does not exist. ElementName – the exact name
JObjectPropertyNameAt object The name of the property at a position; empty when out of range Index – from 0
JObjectKeys object The names of all top-level properties as a JSON array –
JArrayJsonPathValue array A single value at a JSONPath, for example [0].id or $[?(@.type=='main')].id Path
JArrayJsonPathArray array All matches of a JSONPath as a new array, for example [*].id Path
JArrayElementAt array The element at a position; empty when out of range Index – from 0
JArrayFirstElement array The first element; empty for an empty array –
JArrayLastElement array The last element; empty for an empty array –
JArrayLength array The number of elements –
JArrayHasElements array Whether the array contains anything –
JArrayContains array Whether an element equals the value, ignoring case. Texts are compared without quotes, objects as JSON (spacing does not matter). Value
JArraySum array The sum of the numbers; elements that are not numbers are skipped. 0 for no numbers. Path – the field inside each element, for example amount or position.price; empty for an array of numbers
JArrayMin array The smallest number; empty if there is none Path – as for JArraySum
JArrayMax array The largest number; empty if there is none Path – as for JArraySum
JArrayAverage array The average of the numbers; empty if there is none Path – as for JArraySum

8. Building JSON and lists

Rule Result Parameters
JObjectSetProperty Writes a property into a JSON object, overwriting an existing one. An empty input starts a new object. A value that is itself a JSON object or array is written as such; a yes/no value or a number keeps its type; everything else becomes text. Use one rule per property. PropertyName – must not be empty; Value
JObjectRemoveProperty Removes a top-level property (exact name) from a JSON object. A missing property changes nothing. PropertyName
JObjectMerge Merges a second JSON object into the value: properties are added or overwritten, nested objects merged, arrays replaced. An empty input starts a new object. Object
JArrayAppend Adds a value at the end of a JSON array. An empty input starts a new array. Values are written as for JObjectSetProperty. Value
ConcatJArray Adds all elements of a second JSON array at the end. An empty input starts a new array; an empty Array leaves the input unchanged. Array
JArrayRemoveAt Removes the element at a position (from 0). A position out of range changes nothing. Index
JArraySort Sorts a JSON array. Numbers are compared as numbers, everything else as text ignoring case; elements without a value come first. Path – the field inside each element to sort by; empty to sort by the elements themselves; Descending – true for descending, empty for ascending
JArrayDistinct Removes repeated elements and keeps the first of each. Only exactly equal elements count as repeated (1 and "1" differ). –
JArrayReverse Reverses the order of the elements –
SplitStringJsonArray Splits the text at a separator and returns a JSON array of the trimmed, non-empty parts – for example to use a list as the right side of In. An empty separator gives an empty array. Value – the separator, for example ; or ,
SplitStringJsonArrayKeepEmpty Like SplitStringJsonArray, but keeps every part as it is – not trimmed and not removed when empty – so positions stay meaningful: a;;c → ["a","","c"] Value – the separator
SplitLines Splits the text at its line breaks into a JSON array with one entry per line. Empty lines are kept. –
JoinJArray Joins the elements of a JSON array into one text, with the separator between them – the counterpart of SplitStringJsonArray. Texts are written without quotes, numbers and yes/no values as they are, null as empty, and a JSON object or array as compact JSON: [{"val":"a"},{"val":"b"}] with ; gives {"val":"a"};{"val":"b"}. An empty input gives an empty value; a value that is not a JSON array is left unchanged. Separator – for example ; or ,; may be empty to join without a separator
RegexToJArray Runs a regular expression (.NET syntax) and returns a JSON array with one object per match. Each object holds the groups of the match – named groups by name, unnamed ones by number, the whole match as 0. An empty or invalid pattern gives an empty array. Pattern
CsvToJArray Reads CSV text into a JSON array. Fields in double quotes may contain the separator, line breaks and doubled quotes. With a header, each row becomes an object with the column names; otherwise an array of its fields. All values are text. Separator – empty means ,; HasHeader – true if the first line holds the column names
JArrayToCsv Writes a JSON array as CSV text. An array of objects gets one column per property, an array of arrays one column per position. Fields are quoted where needed. Separator – empty means ,; IncludeHeader – true to write the property names as first line

9. XML

The XObject and XArray rules expect an XML document. "Root" is the outermost element. A found element is returned as its text, or as XML when it has child elements.

Rule Result Parameters
XObjectFindElement The direct child of the root with the given name; empty if there is none ElementName
XObjectFindElementWithAttribute The first direct child of the root with the given name that has the given attribute, as XML; empty if there is none ElementName; Attribute
XObjectFindElementWithAttributeValue The first direct child of the root with the given name whose attribute has the given value (compared exactly), as XML ElementName; Attribute; Value
XObjectGetAttributeValue The value of an attribute of the root element; empty if it is missing. Navigate to the element first. Attribute
XObjectXPathValue The first element an XPath selects, relative to the root element (for example Customer/Name). Selects elements only – for attributes use XObjectGetAttributeValue. Path
XObjectXPathArray All elements an XPath selects, relative to the root, as a JSON array – continue with the JArray rules Path
XArrayXPathValue The first element an XPath selects, evaluated against the whole document (for example /Items/Item or //Item) Path
XArrayXPathArray All elements an XPath selects in the whole document, as a JSON array Path
XArrayLength The number of child elements of the root –
XArrayFindElementAt The child element of the root at a position Index – from 0
XArrayFirstElement The first child element of the root –
XArrayLastElement The last child element of the root –
XArrayHasElements Whether the root has any child element –
XmlToJson Converts the XML document into JSON so the JSON rules can read it. Attributes appear as @name. An element that occurs only once becomes an object, not an array with one entry. A value that is not XML stays unchanged. –
JsonToXml Converts JSON into an XML document. Properties starting with @ become attributes. RootElementName – the element to wrap everything in; required if the object has more than one property or is an array (whose elements become item elements)

10. Encoding

Rule Result Parameters
JsonEncode Escapes the value (backslashes, quotes, line breaks) so that it can be put inside a JSON string –
JsonDecode Turns an escaped JSON string back into its content – needed when JSON arrives as a string inside JSON –
EncodeBase64 Encodes the value (UTF-8) as Base64 –
DecodeBase64 Decodes Base64 into UTF-8 text. A value that is not Base64 makes the whole expression empty. –
Base64ToHex Converts Base64 into hexadecimal (lower case) –
HexToBase64 Converts hexadecimal (even number of digits) into Base64 –
UrlEncode Escapes the value for use in a URL query string –
UrlDecode Turns an escaped URL value back into its content –
HtmlEncode Escapes the value for HTML (<, >, &, quotes) – use it when user input goes into an HTML mail or rich text –
HtmlDecode Turns HTML entities such as &amp; back into characters. Does not remove tags – use HtmlToPlainText for that. –
EncodeBackslashCrLf Turns real line breaks into the two characters \n (carriage returns are dropped) –
DecodeBackslashCrLf Turns \n back into real line breaks –
EncodeBackslashQuote Escapes double quotes with a backslash –
DecodeBackslashQuote Turns backslash-escaped quotes back into quotes –

11. Hashing and encryption

Rule Result Parameters
HashSha256 The SHA-256 hash, as upper case hexadecimal –
HashSha512 The SHA-512 hash, as upper case hexadecimal –
HashSha1 The SHA-1 hash, as upper case hexadecimal. Weak – only for compatibility with an external system. –
HashMd5 The MD5 hash, as upper case hexadecimal. Not secure – only for a checksum an external system requires. –
HashHmacSha256 The HMAC-SHA256, as Base64 – what API signatures usually need (add Base64ToHex if hexadecimal is needed) Key – the secret as text
HashHmacSha512 The HMAC-SHA512, as Base64 Key
HashHmacSha1 The HMAC-SHA1, as Base64 Key
HashHmacMd5 The HMAC-MD5, as lower case hexadecimal (unlike the other HMAC rules) Key
EncryptAes256 Encrypts the value with AES-256-GCM and returns Base64. On failure the value stays unchanged. Key – any text; Nonce – exactly 12 characters (12 bytes in UTF-8)
DecryptAes256 Decrypts a value produced by EncryptAes256. On failure the value stays unchanged. Key; Nonce – the same as for encryption

For administrators: Do not write keys and nonces into the definition itself. Take them from global values, so they are maintained in one place.


12. Users, groups and definitions

Rule Result Parameters
UserNameFromId The display name of the user whose id is the value (the id as returned by CurrentUserId). Empty if the value is not an id. –
CurrentUserHasRole Whether the signed-in user has the role named by the value – its id or its name (ignoring case) –
GetGroupMembers The members of the group whose record id is the value, as a JSON array of the record ids of the users' profile records. Empty array if the value is not an id or the group has no members. The read limits of the current user apply. Usable as the right side of In. –
IsMemberOfGroup Whether the user whose profile record id is the value is a member of a group. false if the value or the group is not an id. The read limits of the current user apply. GroupRecId – the record id of the group
DefNameFromId The name of the definition with the given id (its display name, or its internal name if it has none). Empty if no definition of that type has the id. Does not resolve fields – use FieldNameFromId. DefType – the type of the definition, for example EntityDef, QueryDef, ActionDef (Entity also works)
DefIdFromDefName The id of the definition with the given name (internal or display name, ignoring case). Empty if nothing or more than one definition matches – an ambiguous name is never guessed. DefType
FieldNameFromId The name of the field with the given id. Empty if the entity or the field is not found. EntityIdOrName – the entity: its id or name (prefer the id)
FieldIdFromName The id of the field with the given name in an entity. Empty if not found or ambiguous. EntityIdOrName

Group rules work with the entities that hold groups, user profiles and group memberships in your installation. If no such entities exist, GetGroupMembers returns an empty array and IsMemberOfGroup returns false.