> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/map-shape/working-with-field-transformations/available-transform-functions.md).

# Available transform functions

## Introduction

Available transform functions are summarised in the following categories:

* [Array](#array)
* [Date & time](#date-and-time)
* [Number](#number)
* [Other](#other)
* [String](#string)

## Array

<table><thead><tr><th width="150">Transform</th><th width="150">Description</th></tr></thead><tbody><tr><td><a href="/pages/tZDPWUvNFV8cpyHq1FW7">Join</a></td><td>Join elements of an array as a string, based on a defined delimiter.</td></tr></tbody></table>

## Date & time

<table><thead><tr><th width="150">Transform</th><th width="150">Description</th></tr></thead><tbody><tr><td><a href="/pages/BXVUvQh0Voclz5BQQaDO">Custom dynamic date</a></td><td>Apply the date that a process flow runs, with or without adjustments.</td></tr><tr><td><a href="/pages/Xu8n1FgtkcbHvmz39t0Q">Custom static date</a></td><td>Apply a static date.</td></tr><tr><td><a href="/pages/d3ZAqq1vKaStX08NXzRP">Format</a></td><td>Convert a date to a predefined or custom format.</td></tr><tr><td><a href="/pages/vmiS7KpKQ1tb7msvvqkw">Round date</a></td><td>Round a date up/down to the start/end of the day.</td></tr><tr><td>Time now</td><td>Returns the current date and time in your required format.</td></tr><tr><td>Timezone</td><td>Convert dates to a selected timezone.</td></tr></tbody></table>

## Number

<table><thead><tr><th width="150">Transform</th><th width="150">Description</th></tr></thead><tbody><tr><td>Cast to boolean</td><td>Convert a number value to a boolean (true/false) value based on PHP logic.</td></tr><tr><td><a href="/pages/GGIs7qmLC3gjjhR7UuTW">Cast to string</a></td><td>Change the source field data type from <code>number</code> to <code>string</code>.</td></tr><tr><td>Ceiling</td><td>Round up to the nearest whole number.</td></tr><tr><td><a href="/pages/pNFJ23BnsucJKFOFKEws">Custom number</a></td><td>Apply a static number.</td></tr><tr><td>Floor</td><td>Round down to the nearest whole number.</td></tr><tr><td>Make negative</td><td>Convert number to a negative.</td></tr><tr><td>Make positive</td><td>Convert number to a positive.</td></tr><tr><td><a href="/pages/ZDV6ufVXp3y4mU728aTj">Math</a></td><td>Perform a mathematical operation for selected fields.</td></tr><tr><td><a href="/pages/KIVEpYhGTcozTlxVOisx">Round number</a></td><td>Change the number of decimal places.</td></tr></tbody></table>

## Other

<table><thead><tr><th width="150">Transform</th><th width="150">Description</th></tr></thead><tbody><tr><td><a href="/pages/GEoJC6Ov0LZzmojEt77M">Cast to boolean</a></td><td>Define override values for conversion to true/false.</td></tr><tr><td><a href="/pages/FARbvoOgSwoX7wzU3G15">Cast boolean to string</a></td><td>Change the source field data type from <code>boolean</code> to <code>string</code>.</td></tr><tr><td><a href="/pages/egBLpC2Ogo7GaK36YWHW">Cache lookup</a></td><td>Reference a value from cached data.</td></tr><tr><td>Convert weight</td><td>Convert a specified weight unit to a given alternative.</td></tr><tr><td><a href="/pages/VgUPdBivc9R2pRmpLmnv">Custom boolean</a></td><td>Apply a true or false value.</td></tr><tr><td>Fallback</td><td>Set a default value to be used if the given input is empty. Blank values are supported.</td></tr><tr><td>Map</td><td>Convert values using a <a href="/pages/8trpSpsBHu5AxTBZNK3d">cross-reference lookup</a>.</td></tr><tr><td><a href="/pages/PDqizMwce35pjy5TwzZU">Null to string</a></td><td>Convert a null value to an empty string.</td></tr><tr><td><a href="/pages/IMQyFttar8sphsy5A9Z4">Null to zero</a></td><td>Convert a null value to zero (0).</td></tr><tr><td><a href="/pages/piSGxNKtfkk1l5zSi0fF">Null value</a></td><td>Convert a source value to null.</td></tr><tr><td><a href="/pages/VEY4jTycIDsGFwIsudto">Script</a></td><td>Apply a field-level <a href="/pages/oZoHN71i3KN7FMkgdP1x">custom script</a>. Note that a script will time out if it runs for more than 120 seconds.</td></tr></tbody></table>

## String

<table><thead><tr><th width="150">Transform</th><th width="150">Description / Notes</th></tr></thead><tbody><tr><td><a href="/pages/1zLfJ0nc77qdzaoGltCm">Cast to float</a></td><td>Change the source field data type from <code>string</code> to <code>float</code>.</td></tr><tr><td><a href="/pages/CI8vA9SGbiwopICXoFm4">Cast to number</a></td><td>Change the source field data type from <code>string</code> to <code>number</code>.</td></tr><tr><td><a href="/pages/XeTBQlOJDcS2TCxJdS86">Concatenate</a></td><td>Join selected fields with a selected character.</td></tr><tr><td><a href="/pages/9pxQ2yHmsyasEWgxHwUy">Contains one of many</a></td><td>Specify a comma separated list of field values to be matched for inclusion.</td></tr><tr><td>Convert string to boolean</td><td>Convert a string value to a boolean (true/false) value based on PHP logic.</td></tr><tr><td>Country code</td><td>Apply country codes of a selected type (Alpha 1, Alpha 2, Numeric). Note that this transform will cause the map step to fail if an empty value is received.</td></tr><tr><td>Country name</td><td>Return the country name for a country code. Note that this transform will cause the map step to fail if an empty value is received.</td></tr><tr><td><a href="/pages/XeTBQlOJDcS2TCxJdS86">Custom string</a></td><td>Apply static text or reference variables.</td></tr><tr><td><a href="/pages/cH4Cq6eEmBRkbR9ALyTB">Does not contain one of many</a></td><td>Specify a comma separated list of field values to be matched for exclusion.</td></tr><tr><td><a href="/pages/GEl6JeMfMMaevy4WVvMx">First word</a></td><td>Get the first word from a string.</td></tr><tr><td>Hash</td><td>Convert a string to a SHA1 Hash.</td></tr><tr><td><a href="/pages/3YmGRIkrfuJsaBg0jdgT">JSON encode</a></td><td>Encode data into JSON format. Note that although this is listed as a <code>string</code> type transform, any data type is supported.</td></tr><tr><td><a href="/pages/7aBgWKxuopGtFAf8pAKt">Last word</a></td><td>Get the last word from a string.</td></tr><tr><td>Limit</td><td>Truncates a string to a given length.</td></tr><tr><td>Lowercase</td><td>Convert to lowercase.</td></tr><tr><td><a href="/pages/jxX65aeaXqGpAwMLVkMm">Pad</a></td><td>Pad an existing string of characters to a given length, using a given character.</td></tr><tr><td><a href="/pages/PQ54P1sP9fWSs927IYm5">Prefix</a></td><td>Add characters to the beginning of a field.</td></tr><tr><td><a href="/pages/KYbnKZ8kYxbHd7Rk96yJ">Replace</a></td><td>Replace any given character(s) with another character.</td></tr><tr><td><a href="/pages/vXeNTB1zXU327mu2wPOO">Split</a></td><td>Split elements of a string into an array.</td></tr><tr><td><a href="/pages/O9uezsZcvXOrrgea0Wpe">Substring</a></td><td>Return part of a string value.</td></tr><tr><td>Suffix</td><td>Add a string to the end of a field.</td></tr><tr><td>Trim whitespace</td><td>Remove any characters around a string.</td></tr><tr><td>Uppercase</td><td>Convert to uppercase.</td></tr><tr><td>URL decode</td><td>Convert an encoded URL into a readable format.</td></tr><tr><td>URL encode</td><td>Convert a string to a URL encoded string.</td></tr></tbody></table>
