Value Modifiers
This page provides you with a comprehensive list of all the available modifications you can apply to text, numbers, lists, and dates within DealerClear. Each modifier includes its purpose, a brief description, and the expected input parameters.
Modifiers are a powerful tool for refining and transforming data, especially for matching and mapping logic. However, their flexibility comes with responsibility. To ensure accuracy and avoid unintended outcomes, it’s crucial to carefully test and validate your modifier configurations before applying them to live services.
The results of poorly tested modifiers can be app-breaking. When in doubt, contact support.
Text Modifiers
Note: All string/text mods begin with the str__ prefix.
| Modifier | Description | Parameters | Example |
|---|---|---|---|
| str__add_prefix | Adds a prefix to the value. | <prefix> | Input: value, Prefix: pre_ → pre_value |
| str__add_suffix | Adds a suffix to the value. | <suffix> | Input: value, Suffix: _post → value_post |
| str__remove | Removes instances of a character or set of characters from the value. | <char> | Input: hello, Remove: l → heo |
| str__replace | Replaces instances of a character or set of characters with a substitute. | <char>||<substitute> | Input: cat, Replace: c||b → bat |
| str__split | Splits the value by a delimiter and grabs an item by index (starting at 0). | <delimiter>||<index> | Input: a,b,c, Split: ,||1 → b |
| str__cut_left | Removes a specified number of characters from the left of the value. | <num_chars> | Input: abcdef, Cut: 3 → def |
| str__cut_right | Removes a specified number of characters from the right of the value. | <num_chars> | Input: abcdef, Cut: 3 → abc |
| str__trim | Removes leading and trailing whitespace. | None | Input: hello → hello |
| str__pad_left | Pads the value on the left with spaces to the specified total length. | <total_length> | Input: cat, Pad: 5 → cat |
| str__pad_right | Pads the value on the right with spaces to the specified total length. | <total_length> | Input: cat, Pad: 5 → cat |
| str__capitalize | Capitalizes the first character of the value. | None | Input: hello → Hello |
| str__title_case | Converts the value to title case. | None | Input: hello world → Hello World |
| str__upper_case | Converts the value to upper case. | None | Input: hello → HELLO |
| str__lower_case | Converts the value to lower case. | None | Input: HELLO → hello |
| str__repeat | Repeats the value a specified number of times. | <times> | Input: ha, Repeat: 3 → hahaha |
| str__reverse | Reverses the value. | None | Input: hello → olleh |
| str__slice | Extracts a substring using start and end indices. | <start_index>||<end_index> | Input: abcdef, Slice: 1||4 → bcd |
Number Modifiers
Note: All numerical mods begin with the num__ prefix.
| Modifier | Description | Parameters | Example |
|---|---|---|---|
| num__add | Adds a specified number to the value. | <number> | Input: 10, Add: 5 → 15 |
| num__subtract | Subtracts a specified number from the value. | <number> | Input: 10, Subtract: 3 → 7 |
| num__multiply | Multiplies the value by a specified number. | <number> | Input: 4, Multiply: 3 → 12 |
| num__divide | Divides the value by a specified number. Returns 0 if divisor is 0. | <number> | Input: 10, Divide: 2 → 5; Divisor: 0 → 0 |
| num__round | Rounds the value to a specified number of decimal places. | <decimal_places> | Input: 3.14159, Round: 2 → 3.14 |
| num__floor | Rounds the value down to the nearest whole number. | None | Input: 4.8 → 4 |
| num__ceil | Rounds the value up to the nearest whole number. | None | Input: 4.2 → 5 |
| num__modulus | Returns the remainder of the value divided by a specified number. | <number> | Input: 10, Modulus: 3 → 1 |
| num__power | Raises the value to the power of a specified number. | <exponent> | Input: 2, Power: 3 → 8 |
| num__format | Formats the value as a string using a specified format (e.g., .2f for two decimal places). | <format_string> | Input: 3.14159, Format: .2f → 3.14 |
List Modifiers
Note: All list mods begin with the list__ prefix.
| Modifier | Description | Parameters | Example |
|---|---|---|---|
| list__length | Returns the number of elements in the list. | None | Input: [1, 2, 3] → 3 |
| list__get | Retrieves the element at the specified index. | <index> | Input: [10, 20, 30], Index: 1 → 20 |
| list__append | Appends a specified value to the list. | <value> | Input: [1, 2], Append: 3 → [1, 2, 3] |
| list__extend | Extends the list with elements from a comma-separated string. | <comma_separated_values> | Input: [1, 2], Extend: 3,4 → [1, 2, 3, 4] |
| list__remove | Removes all instances of the specified value from the list. | <value> | Input: [1, 2, 2, 3], Remove: 2 → [1, 3] |
| list__slice | Returns a portion of the list based on specified start and end indices. | <start_index>||<end_index> | Input: [1, 2, 3, 4], Slice: 1||3 → [2, 3] |
Date & Time Modifiers
Note: All date mods begin with the date__ prefix and datetime mods with datetime__.
The official date/datetime formats:
- Date =
YYYY-MM-DD - DateTime =
YYYY-MM-DD HH:MM:SS
| Modifier | Description | Parameters | Example |
|---|---|---|---|
| date__from_format | Parses a date string using the specified format and returns a date object. | <format> | Input: 2023-12-01, Format: YYYY-MM-DD → Date Object: 2023-12-01 |
| datetime__from_format | Parses a datetime string using the specified format and returns a datetime object. | <format> | Input: 2023-12-01 14:30:00, Format: YYYY-MM-DD HH:MM:SS → Datetime Object: 2023-12-01 14:30:00 |
| date__to_format | Formats a date string into the specified format (e.g., YYYY-MM-DD). | <format> | Input: 01/12/2023, Format: DD/MM/YYYY → 2023-12-01 |
| datetime__to_format | Formats a datetime string into the specified format (e.g., YYYY-MM-DD HH:MM:SS). | <format> | Input: 01-12-2023 02:30 PM, Format: DD-MM-YYYY hh:mm A → 2023-12-01 14:30:00 |
| datetime__add_days | Adds a specified number of days to a date. | <number_of_days> | Input: 2023-12-01, Add: 5 → 2023-12-06 |
| datetime__subtract_days | Subtracts a specified number of days from a date. | <number_of_days> | Input: 2023-12-01, Subtract: 5 → 2023-11-26 |
| datetime__add_hours | Adds a specified number of hours to a datetime. | <number_of_hours> | Input: 2023-12-01 14:00:00, Add: 3 → 2023-12-01 17:00:00 |
| datetime__subtract_hours | Subtracts a specified number of hours from a datetime. | <number_of_hours> | Input: 2023-12-01 14:00:00, Subtract: 3 → 2023-12-01 11:00:00 |
| datetime__day_of_week | Returns the day of the week for a specified date. | None | Input: 2023-12-01 → Friday |
| datetime__day_of_year | Returns the day of the year for a specified date. | None | Input: 2023-12-01 → 335 |
| datetime__year | Extracts the year from a specified date. | None | Input: 2023-12-01 → 2023 |
| datetime__month | Extracts the month from a specified date. | None | Input: 2023-12-01 → 12 |
| datetime__day | Extracts the day from a specified date. | None | Input: 2023-12-01 → 1 |
| date_split | Splits a date into year, month, and day components as a list. | None | Input: 2023-12-01 → [2023, 12, 1] |
This reference is a quick guide to all available modifications, organized by data type. Use it to quickly find the modifiers that meet your needs.