String Handling Functions
String handling functions can be used for modifying the individual field inputs before formation of the input payload. These functions can also be used for validations in the SCRIPT function.
STRING functions can be used in all three sections of DATA TRANSFORMATION i.e. HEADER, FOOTER or FIELD.
String functions can be used in two ways:
-
Modify individual field input –
These can be done only for the input file data i.e. not for DEFAULT values with ‘SEQUENCE - 0’. Fields with SEQUENCE ‘0’ can use this String functions only with SCRIPT function.
EDIT INPUT flag should be selected to have default values configured for FIELD’s that have SEQUENCE not equal to ZERO i.e. ‘0’.
-
Use with SCRIPT function -
SCRIPT function with STRING functions use has no constraints. Invoking STRING function with in SCRIPT has a different SYNTAX. STRING functions are invoked with reference to the FIELD NAME i.e. FIELD_NAME.STRING_FUNCTION
Example:
SCRIPT([PERSONIDNUMBER!=''&&PERSONIDTYPE=''],{PERSONIDNUMBER.SUBSTR(0,3)})
List of functions:
-
Substring
-
Substring from search string(Inclusive) - SUBSTR('startString')
-
Substring from startIndex - SUBSTR(startIndex)
-
Substring from search string(Inclusive) to endIndex - SUBSTR('startString',endIndex)
-
Substring from startIndex to search string(Inclusive) - SUBSTR(startIndex,'endString')
-
Substring from startIndex to endIndex - SUBSTR(startIndex,endIndex)
-
Substring between given string inputs - SUBSTR('startString','endString')
-
Substring to get last index Char Sequence - SUBSTRLAST(startIndex)
-
-
Prefix the input string - PREFIX('prefixString')
-
Suffix the input string - SUFFIX('suffixString')
-
Convert string to uppercase - UPPERCASE()
-
Convert string to lowercase - LOWERCASE()
-
Right trim the input string - RTRIM()
-
Left trim the input string - LTRIM()
-
Right and Left trim the input string - TRIM()
-
Concat - CONCAT(FLD_NAME1||FLD_NAME2)
-
ISNUMBER(INPUT_VALUE) – This can be used only with SCRIPT function
-
LENGTH(INPUT_VALUE) – This can be used only with SCRIPT function
-
ISUTF8 (INPUT_VALUE) – This can be used only with SCRIPT function
-
CONTAINS (INPUT_VALUE,SEARCH_STRING,EXPECTED_OUTPUT) – This can be used only with SCRIPT function
-
STARTSWITH(INPUT_FLD,SEARCH_STRING,EXPECTED_OUTPUT)– This can be used only with SCRIPT function
-
ENDSWITH(INPUT_FLD,SEARCH_STRING,EXPECTED_OUTPUT)– This can be used only with SCRIPT function
Related Topics:
Parent Topic: Supported Functions for Default Value