AnsweredAssumed Answered

How may I strip leading zeroes from character profile elements?

Question asked by mickey on Apr 3, 2017
Latest reply on Apr 6, 2017 by 423849

I need to concatenate three character-type elements from a flat file profile in order to create a composite external ID which I will then use to upsert records into SFDC.

Below are two illustrations of this concept.  The first screen shot is an example of what the Map shape might look like.  I want to create a custom JavaScript function to strip leading zeroes from the three character-type profile attribtues and then concatenate the three strippedl elements with a hyphen ('-') delimiter between the three parts of the composite key.  Lastly, this composite key is assigned to the output argument [External_Id].

The below table shows two examples of input and desired output.




What would the Custom Scripting JavaScript or Groovy script look like to accomplish this result?