Default Transform Definitions

  • Release version: Xanadu
  • Updated August 1, 2024
  • 5 minutes to read
  • Summarize
    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 Default Transform Definitions

    ServiceNow provides a set of default transform definitions designed to manipulate field values during data transformation processes. These definitions apply to text, numeric, and text-numeric fields, enabling standardized data formatting and normalization. They help automate data cleansing, formatting, and rounding tasks to ensure data consistency and quality in your instance.

    Show full answer Show less

    Key Features

    • Text Transformations: Includes changing character case (upper, lower, proper, formal), inserting or deleting character sequences at specified positions, adding prefixes or suffixes, replacing substrings using literal or regular expressions, trimming spaces, and extracting or modifying substrings from either side or within the string.
    • Numeric Transformations: Supports rounding numeric values to configured intervals with various rounding criteria such as half up/down, toward/away from zero, and rounding to even/odd numbers. Also includes converting values to constants and trimming spaces.
    • Position Parameters: Many text transforms use start and end positions to define the substring for operations. Understanding position modes is essential for precise modifications.
    • Transform Variables: Allow administrators to reuse the same transform definition across different fields and contexts with customizable parameters, increasing flexibility and efficiency.
    • Transform Categories: Enable grouping of related transform definitions to organize and manage them effectively.
    • Custom Transform Scripts: Administrators can create scripts during configuration to implement complex or specialized data transformations beyond the default options.

    Practical Application for ServiceNow Customers

    Using these default transform definitions, you can automate the normalization of imported or integrated data, ensuring it adheres to your organization's standards without manual intervention. For example, you can automatically convert text fields to proper case, remove unwanted characters, or round numeric values according to business rules. The ability to create custom definitions and variables allows tailoring transformations to specific data sources or fields, enhancing data quality across your ServiceNow environment.

    When configuring transformations, pay attention to parameter settings such as position modes and rounding intervals to align with your data's format and units. Grouping transforms into categories and leveraging transform variables will simplify management and reuse.

    The system offers default transform definitions for fields containing text, text numeric, and numeric values.

    Table 1. Transform Definitions
    Transform Type Category Description Parameters
    Change case Text Changes the case of the characters in the field value. Mode: Select one of the following modes:
    • Upper: Converts the value to all upper case characters
    • Lower: Converts the value to all lower case characters
    • Proper: Converts the value to title case, with the first character in each string in upper case, and the remaining characters of the string in lower case.
    • Formal: Converts the value to a string in which only the first letter of the first word is in upper case.
    Constant Text Numeric Converts the value in this field to a constant. Constant: The constant with which to replace the value in this field.
    Delete Text Delete a specified sequence of characters from a field value.
    • Starting position: Specifies the first character in a sequence of characters to delete from a string. See the discussion of position modes at the beginning of this section for details.
    • Ending position: Specifies the final character in a sequence of characters to delete from a string. See the discussion of position modes at the beginning of this section for details.
    Insert Text Insert a fixed character sequence into a field value.
    • Position: The character position at which to insert the new value. See the discussion of position modes at the beginning of this section for details.
    • Insert: The value to insert into this field.
    Left Text Deletes or keeps a specified number of characters from the left side of this field value.
    • Position: Specifies the number of characters to keep or delete from the left side of the value. See the discussion of position modes at the beginning of this section for details.
    • Mode: Select the mode for this transform: Keep or Delete.
    Prefix Text Adds characters to the beginning of a field value. Prefix: Defines the characters to add to the beginning of the transformed field value.
    Replace Text Replaces occurrences of one string with another string. The special characters backslash (\) and dollar sign ($) in the replacement string can cause the transform to be different than if the replacement string were being treated as a literal replacement string. Use a regular expression to replace a string or parts of a string.
    • Find: Enter the string or regular expression to replace.
    • Replace with: Enter the replacement string.
    Right Text Retains or deletes a specified number of characters from the right side of a field value.
    • Position: The number of characters to delete or keep from the right side of this transformed field. See the discussion of position modes at the beginning of this section for details.
    • Mode: Select the mode for this transform: Keep or Delete.
    Round Numeric Rounds integers to a configured rounding interval using specific criteria. The interval must be appropriate to the value being transformed, such as an interval of 12 for a value expressed in dozens or 0.01 for decimal values expressed in hundredths.
    • Interval: Select the rounding interval that is appropriate to the units of the field value. For example. an interval of 256 is appropriate for expressing RAM values in megabytes, but does not work for Disk space expressed in gigabytes. The rounding interval for the examples below is 1
    • Mode: Criteria for applying the rounding interval.
      • Half up: Always round up a value that is exactly half way between two intervals. For example, 3.5 is always rounded up to 4, and -3.5 is always rounded up to -3.
      • Half down: Always round down a value that is exactly half way between two intervals. For example, 3.5 is always rounded down to 3, and -3.5 is always rounded down to -4.
      • Half away from zero: Always round an integer that is half way between the specified interval away from zero. For example, 3.5 is always rounded to 4, and -3.5 is always rounded to -4.
      • Half toward zero: Always round an integer that is half way between the specified interval toward zero. For example, 3.5 is always rounded to 3, and -3.5 is always rounded to -3.
      • Half to even: Always round an integer that is half way between the specified interval to the nearest interval whose least significant digit is even. For example, 3.5 is always rounded to 4, and 4.5 is always rounded to 4.
      • Half to odd: Always round an integer that is half way between the specified interval to the nearest interval whose least significant digit is odd. For example, 3.5 is always rounded to 3, and 4.5 is always rounded to 5.
      • Up: Always round an integer up by the specified rounding interval. For example, 3.4 is always rounded to 4 by a rounding interval of 1.0.
      • Down: Always round an integer down by the specified rounding interval. For example, 4.6 is always rounded to 4 by a rounding interval of 1.0.
      • Away from zero: Always round an integer away from zero by the specified rounding interval. For example, 3.3 is always rounded to 4, and -3.3 is always rounded to -4 by a rounding interval of 1.0.
      • Toward zero: Always round an integer toward zero by the specified rounding interval. For example, 3.3 is always rounded to 3, and -3.3 is always rounded to -3 by a rounding interval of 1.0.
    Substring Text Keep or delete characters from a specified sub-sequence of characters in the field value.
    • Starting position: Specifies the first character in a sub-sequence of characters within the value. See the discussion of position modes at the beginning of this section for details.
    • Ending position: Specifies the final character in a sub-sequence of characters within the value. See the discussion of position modes at the beginning of this section for details.
    • Mode: Select whether to Delete the sub-sequence selected or Keep only those characters defined.
    Suffix Text Appends characters to the end of a field value. Suffix: Defines the suffix to add to the end of the field value.
    Trim Text Numeric Removes blank spaces from the field value. No parameters