Variable Transform
Variable Transform maps one source variable into one or more derived variables in a single step by matching the source value to a configured mapping and then writing output variables for later actions. It runs on iOS, macOS, and mac Catalyst with optional normalization, optional stop-on-miss behavior, and separator-based splitting for multi-value fan-out.
Required Parameters
sourceKeynormalizeInputstopIfNoSubstitutionseparatoroutputsmappings
Commands
title
- Transforms resolved text into title case.
- Use as a chain segment like
variable | title. - No arguments.
upper
- Converts resolved text to uppercase.
- Chain with the pipe syntax.
- No arguments.
lower
- Converts resolved text to lowercase.
- Chain with the pipe syntax.
- No arguments.
capitalize
- Capitalizes only the first character.
- Chain with the pipe syntax.
- No arguments.
trim
- Trims whitespace from both ends.
- Chain with the pipe syntax.
- No arguments.
slug
- Converts text into slug-style hyphen-separated output.
- Chain with the pipe syntax.
- No arguments.
strip_non_alphanumeric
- Removes special characters while preserving spaces.
- Chain with the pipe syntax.
- No arguments.
truncate
- Limits text to a maximum length.
- Requires one numeric argument,
length. - If
lengthis missing/invalid, input is returned unchanged.
replace
- Replaces one substring with another.
- Requires one
from,toargument pair. - If both arguments are not present, input is returned unchanged.
number_words
- Converts digit tokens into words.
- Applies to numeric content in the resolved value.
number_digits
- Converts spelled-out numbers to digits.
- Non-number text is preserved.
add
- Adds a numeric value.
- Requires one numeric argument.
- If parsing fails, input is returned unchanged.
sub
- Subtracts a numeric value.
- Requires one numeric argument.
- If parsing fails, input is returned unchanged.
mul
- Multiplies by a numeric value.
- Requires one numeric argument.
- If parsing fails, input is returned unchanged.
div
- Divides by a numeric value.
- Requires one numeric argument.
- If parsing fails, input is returned unchanged.
min
- Clamps the value to a minimum threshold
value. - Requires one numeric argument.
- If parsing fails, input is returned unchanged.
max
- Clamps the value to a maximum threshold
value. - Requires one numeric argument.
- If parsing fails, input is returned unchanged.
clamp
- Clamps to an inclusive range using
min,max. - Requires both values in one comma-separated pair.
- If either bound is invalid/missing, input is returned unchanged.
mod
- Applies modulo with the provided divisor.
- Requires one numeric argument.
- Division-by-zero returns unchanged input.
round
- Rounds to the nearest integer.
- Numeric input required.
- Non-numeric input is returned unchanged.
floor
- Rounds downward to the nearest integer.
- Numeric input required.
- Non-numeric input is returned unchanged.
ceil
- Rounds upward to the nearest integer.
- Numeric input required.
- Non-numeric input is returned unchanged.
abs
- Returns absolute value.
- Numeric input required.
- Non-numeric input is returned unchanged.
format
- Formats a numeric value using a pattern argument.
- If the pattern has a decimal point, fractional digits are fixed to that count; without it, no fractional digits are shown.
- If parsing/formatting fails, input is returned unchanged.
Pipeline notes
- Multiple commands can be chained in order.
- Unknown commands leave the value unchanged and continue.
- Mapping lookup is normalized when
normalizeInputis enabled (trim + lowercase); otherwise raw matching is used. - If no mapping exists and
stopIfNoSubstitutionistrue, the action stops sequence execution (non-fatal).