How to Trim a String

Document created by justin_petrone Employee on Mar 22, 2012
Version 1Show Document
  • View in full screen mode
Hypothetical Scenario: 

Assume your input is 'ABCDE' and you only want the first 3 characters of the string to be outputted (i.e. 'ABC'). What is the best way to accomplish this?

     You can use a Right Character Trim function in the map to accomplish this task. It's important to understand that the  Fix To Length value in this case is fixing the length of the output string, not the length of the characters being trimmed.

0EM40000000PHwh

     If mapping the data from a source profile in a map, leave the 'Original String' field blank, since you'll map the source field to the Original String field of the function.  For our example here, we'll set the 'Fix To Length' value to 3.

0EM40000000PHwm

     Within the map, connect the source profile element (in this case 'Rating') to the 'Original String' field in the function and the 'Result' field of the function to your destination field (in this case 'CUST_REF'.

0EM40000000PHwr

     This should produce the following:

     Original innput (Rating): ABCDE
     Output (CUST_REF): ABC

Attachments

    Outcomes