---
sourceDocument: Australia Build workflows
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/build-workflows

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Transform functions

# Transform functions {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read

Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Transform Functions

Transform functions allow you to modify data pill values in ServiceNow without scripting, enabling text reformatting, mathematical calculations, SQL sanitization, and XML serialization.
Various categories are available, including date and time, string, utilities, simple math, and sanitization functions for shell arguments and SQL.
Show full answer Show less  

## Key Features

* **Data Manipulation:** Apply functions such as trimming whitespace, adding time, and sanitizing SQL values to ensure data integrity.
* **Sequential Application:** Multiple transform functions can be applied to the same data pill, processed in the order listed in the Applied Transforms.
* **Automatic Suggestions:** The system recommends relevant transform functions based on the input type, enhancing user experience.
* **Validation Guidelines:** Ensure that transform functions are applied to valid data pill types to avoid errors during execution.

## Key Outcomes

By utilizing transform functions, customers can streamline data handling processes within flows, ensure data security, and enhance the accuracy of integrations. The system provides real-time feedback on applied transforms and final values, helping users verify expected outcomes.  
Transform data pill values without the need to write a script. Use transform functions to reformat text, perform mathematical calculations, sanitize potentially unsafe SQL statements, and serialize complex objects to raw XML.

Available transform function categories include [date and time](https://servicenow-prod.fluidtopics.net/hBhDVwmZKgUd4kp79zitfA "Use date and time transform functions to recalculate or reformat data pills for Date/Time values."), [string](https://servicenow-prod.fluidtopics.net/~KLQRtaH2IFGxnlMmPf4cw "Use string transform functions to reformat or perform calculations on String data pills."), [utilities](https://servicenow-prod.fluidtopics.net/CV8WPZq0pQ_GoTv~_vJoJQ "Use utilities transform functions to return a Complex Object from an Array, or a value associated with a specific key."), [simple math](https://servicenow-prod.fluidtopics.net/BJJuJLPQbyGnDhhDjpXmDg "Use simple math transform functions to perform basic mathematical calculations on Number data pills."), [sanitize shell
arguments](https://servicenow-prod.fluidtopics.net/846CWdqN0oPXNRmCWE1emA "Use sanitize shell arguments transform functions to remove any potentially unsafe command injections in String data pills to be used for Bash shell scripting."), [sanitize
SQL](https://servicenow-prod.fluidtopics.net/zKVQxub1xDnGcP~DwykIjQ "Use sanitize SQL transform functions to escape special characters and prevent injection in String data pills to be used for SQL statements."), and [complex
data](https://servicenow-prod.fluidtopics.net/xEdukMeLSxjPNUsH0HBeKw "Use complex data transform functions to serialize Complex Object data pills into an XML format."). Some examples of transform function uses include:  
* Trimming white space from a string before integrating it into the CMDB.
* Adding days, hours, minutes, and seconds to a date or time to localize for a specific time zone.
* Sanitizing SQL values to prevent injection as part of a [JDBC step](https://servicenow-prod.fluidtopics.net/Kar6poz~OjqtUG7I0xdtJg "Create a reusable action to send SQL commands to a relational database.") for an Integration Hub spoke.
* Retrieving an appropriate value from a map of priorities that have equivalent values in a third-party database.
* Transforming a complex object into raw XML as part of a [REST step](https://servicenow-prod.fluidtopics.net/~GkzH8e26WHvxHLTGNG7Gg "Send an outbound REST web service request to an external system.") Request Body field.
{#transform-functions__ul_n23_4cl_t3b}  
Note:  
Custom transform functions are not currently supported. For information on creating custom functions to transform Workflow Studio data, see [Inline scripts](https://servicenow-prod.fluidtopics.net/IvnVdbhN2MqmXg2GwAWwQQ "Enable users with coding experience to write inline scripts that set and modify input values during the configuration of an action or flow. Use inline scripts to modify input values that require small format conversions, data transformations, or math operations.").

## Applying a transform function {#transform-functions__section_rjd_mhl_t3b}

You can apply a transform function to a data pill when you are designing or creating a
flow. To apply a transform function, point or tab to a data pill and select the
f(x) (![function icon]()) icon that appears. Selecting the icon displays the Available Transforms list.
Select the transform function that you want to apply to your data pill, enter information
into any required fields, and select Apply. Your selected transform
function appears in the Applied Transforms list.

## Applying multiple transform functions {#transform-functions__section_f5v_dqn_kjb}

You can apply multiple transform functions to the same data pill. The system applies
transform functions sequentially from top to bottom as listed in the Applied Transforms
list. For example, you can apply a String to Date transform function followed by the Add
Time transform function.

## Viewing applied transform functions {#transform-functions__section_afb_fng_r3b}

You can find out which transform functions are applied to a data pill by looking at the Applied Transforms list. When you are designing or creating a flow or action, point to or tab into the data pill and select the f(x) (![function icon selected]()) icon. You can also view applied transform functions in the [flow execution details](https://servicenow-prod.fluidtopics.net/74QTppHjnADqEx74Gqai7w "View run-time information about an action or flow directly from the design environment, such as the current state, items run, and values produced. Open related records from embedded ServiceNow AI Platform editors or in a new tab.").  
Note:  
The output values for applied transform functions are field values, not [Display values](https://www.servicenow.com/docs/access?context=c_DisplayValues&version=australia&pubname=australia-platform-administration&ft:locale=en-US).  
When a data pill is dropped into certain types of inputs, the system automatically suggests a transform function category that is related to the input. For example, the system suggests transform functions to escape special characters in SQL statements, prevent script injection in shell scripts, and validate API or operation requests. Currently, the system suggests transform function categories for these inputs:

* For data pills dropped in the JDBC step's SQL Statement input, the [sanitize SQL transform function category](https://servicenow-prod.fluidtopics.net/zKVQxub1xDnGcP~DwykIjQ "Use sanitize SQL transform functions to escape special characters and prevent injection in String data pills to be used for SQL statements.") is displayed automatically.
* For data pills dropped in the SSH step's Command input, the [sanitize shell arguments transform function category](https://servicenow-prod.fluidtopics.net/846CWdqN0oPXNRmCWE1emA "Use sanitize shell arguments transform functions to remove any potentially unsafe command injections in String data pills to be used for Bash shell scripting.") is displayed automatically.
{#transform-functions__ul_wd4_13d_ljb}

## General guidelines {#transform-functions__id_m33_yvb_ptb}

Apply transform functions to valid types of data pills for the input
:   Be sure to check the type of data pill for the input before applying a transform function. Applying a transform function to an invalid data pill type results in the system skipping the transform. An error also occurs if
    transform functions produce results that the system cannot parse. For example, when transforming a string into a date, the system throws an error if the transform does not produce a valid date.

Confirm applied transform functions for multiple inputs with the same
data
pill
:   A transform function creates a new value at runtime for a specific input, and does not change the original data pill. If you use the same data pill across multiple actions or steps,
    transform functions must therefore be applied to each individual input.

View final transformed values in the flow execution details{#transform-functions__final-transformed-value}
:   Only the final transformed value appears in the [flow execution details](https://servicenow-prod.fluidtopics.net/74QTppHjnADqEx74Gqai7w "View run-time information about an action or flow directly from the design environment, such as the current state, items run, and values produced. Open related records from embedded ServiceNow AI Platform editors or in a new tab."), and not the value for each applied transform.

Test transform functions to verify they produce expected results
:   Make sure that your transform functions produce the expected runtime values for the data pills. For more information, see [Test a flow](https://servicenow-prod.fluidtopics.net/16GAKmUMqo2akmwgAuG1TA "Before activating a flow so other users can access it, test to make certain it works the way you expect.") and [Test an action](https://servicenow-prod.fluidtopics.net/RkJbg1UGUC3YJAc2dyKZOQ "Test an action before publishing it for other users.").
* **[Date and time transform functions](https://servicenow-prod.fluidtopics.net/hBhDVwmZKgUd4kp79zitfA)**   
  Use date and time transform functions to recalculate or reformat data pills for Date/Time values.
* **[String transform functions](https://servicenow-prod.fluidtopics.net/~KLQRtaH2IFGxnlMmPf4cw)**   
  Use string transform functions to reformat or perform calculations on String data pills.
* **[Utilities transform functions](https://servicenow-prod.fluidtopics.net/CV8WPZq0pQ_GoTv~_vJoJQ)**   
  Use utilities transform functions to return a Complex Object from an Array, or a value associated with a specific key.
* **[Simple math transform functions](https://servicenow-prod.fluidtopics.net/BJJuJLPQbyGnDhhDjpXmDg)**   
  Use simple math transform functions to perform basic mathematical calculations on Number data pills.
* **[Sanitize shell arguments transform functions](https://servicenow-prod.fluidtopics.net/846CWdqN0oPXNRmCWE1emA)**   
  Use sanitize shell arguments transform functions to remove any potentially unsafe command injections in String data pills to be used for Bash shell scripting.
* **[Sanitize SQL transform functions](https://servicenow-prod.fluidtopics.net/zKVQxub1xDnGcP~DwykIjQ)**   
  Use sanitize SQL transform functions to escape special characters and prevent injection in String data pills to be used for SQL statements.
* **[Complex data transform functions](https://servicenow-prod.fluidtopics.net/xEdukMeLSxjPNUsH0HBeKw)**   
  Use complex data transform functions to serialize Complex Object data pills into an XML format.

