Here’s an example CALLSCRIPT script that references record data passed to it:
1 2 3 4 5 6 7 8 9 10 11 | var myFieldContents = myRecord["Store List ID"]; var mySplitContents = myFieldContents.split(","); var myNbrOfChunks = mySplitContents.length; var myCodeList = "" for (thisChunk = 0;thisChunk < myNbrOfChunks;thisChunk++) { var myChunk = mySplitContents[thisChunk]; var myCode = String(myChunk.substring(myChunk.length - 2, myChunk.length)) var myCodeList = myCodeList + " " + myCode } myCodeList; |