The Modify Field element allows you to transform the value of one or more fields before they are stored (in structures) or sent to an integration (in cascade). It is part of the Connection Creator feature and can be applied anywhere fields are processed.
Modify Field is used in multiple places:
How Modify Field Works
A Modify Field configuration typically contains:
- Source – choose whether the modification works on this field’s value or the value of another field.
- Condition (Operator + Value) – define when the modification should be applied (e.g. if equals approved).
👉 Operators and values are described in detail in their own wiki pages. - Operation – the actual modification performed (e.g. add prefix, replace text, change format, regex replace, convert to number, skip sending).
- Output – what the field should look like after modification (string, regex substitution, or formatted expression).
You can chain multiple modifiers on the same field. They are executed in the order you define, with the result of one step becoming the input for the next. For example:
- load-from-lead → regex-replace → urlencode
Typical Use Cases
- Formatting IDs – add separators into an identifier if needed (e.g. insert / into a Czech National ID).
- Data cleanup – strip unwanted characters, unify lowercase/uppercase before sending to API.
- Date handling – convert Unix timestamps into human-readable dates or reformat them for external APIs.
- Derived values – extract gender or birthdate from a National ID, calculate categories based on numeric ranges.
- Suppressing data – skip sending a value altogether (using do-not-send).
Why Use Modify Field
- Centralizes field transformation inside PalDock flows.
- Reduces the need for preprocessing in external systems.
- Makes it easier to reuse logic across multiple structures and integrations.
⚠️ Note: Operators and values are powerful but context-dependent. Some combinations won’t make sense everywhere. Always test your Modify Field setup with sample data. For details, see the dedicated pages: Operators and Values.
Multiple Modifiers and their order
You can apply multiple modifiers to the same field. Modify Field operations are processed in order, from top to bottom. The output of one step becomes the input for the next. That allows you to perform more advanced transformations where one step builds on the result of the previous one.
⚠️ Note: If you need to perform multiple modifications independently (without chaining each step on the output of the previous one), you can create separate custom form fields for each modification. Later, you can combine these fields into the main custom field.
Example: deriving gender from a local National Identification Number (NIN)
In this example, the gender is encoded in the NIN. The NIN has 10 digits, where the 3rd and 4th digits represent the month of birth. By interpreting the month code, gender can be derived:
- Males: month 01–12
- Females: month 51–62
We create a separate field for gender and apply the following modifiers:
- Extract the month code (3rd and 4th digit)
- Source: value
- Condition: always
- Operation: regex
- Pattern: (?<=^\d{2})\d{2}
- Map to female if month code ≥ 50
- Source: value
- Condition: bigger than 50
- Operation: replace
- Output: 1 (female)
- Map to male if month code ≤ 12
- Source: value
- Condition: smaller than 13
- Operation: replace
- Output: 0 (male)
Example: deriving birth date from a local National Identification Number (NIN)
In this example, the birth date is encoded in the NIN. The NIN has 10 digits, where:
- 1st and 2nd digits = year
- 3rd and 4th digits = month
- 5th and 6th digits = day
We create four separate fields: birth_year, birth_month, birth_day, and birth_date. Each helper field loads the original NIN independently, and the final field combines them into a proper date.
Step 1 – Year (yyyy)
- load from lead → source NIN
- first regex match → pattern ^\d{2} (extracts the first two digits)
- prefix 20 with condition smaller than 26
- prefix 19 with condition bigger than 25
Result: full four-digit year.
Step 2 – Month (mm)
- load from lead → NIN again
- first regex match → pattern (?<=^\d{2})\d{2} (extracts the two-digit month code)
- math {value} – 70 if bigger than 70
- math {value} – 50 if bigger than 50
Result: month number after removing gender encoding.
Step 3 – Day (dd)
- load from lead → NIN again
- first regex match → pattern (?<=^\d{4})\d{2} (extracts the fifth and sixth digits).
Result: day of birth.
Step 4 – Combine and format
- combine → template {birth_year}-{birth_month}-{birth_day}
- format date → with mask d.m.Y (for example: 07.03.1986).
⚠️ Note: Be very careful with complex Modify Field chains. Keep each step precise and test thoroughly, since small mistakes can break the flow.
Modify field structure
Name | Pattern | Output |
---|---|---|
to-float | ❌ | ❌ |
to-bool | ❌ | ❌ |
to-int | ❌ | ❌ |
replace | ❌ | ✅ |
match | ✅ | ❌ |
unix | ❌ | ❌ |
prefix | ❌ | ✅ |
postfix | ❌ | ✅ |
first-regex-match | ✅ | ❌ |
do-not-send | ❌ | ❌ |
format-date | ✅ | ❌ |
modify-date | ✅ | ❌ |
cz-nin-to-birthdate | ❌ | ❌ |
cz-nin-to-gender | ❌ | ❌ |
to-base64 | ❌ | ❌ |
from-base64 | ❌ | ❌ |
load-from-lead | ❌ | ❌ |
regex-replace | ✅ | ✅ |
urlencode | ❌ | ❌ |
urldecode | ❌ | ❌ |
combine | ❌ | ❌ |