Forum Discussion
NeverTooOldToLe
8 years agoNew Contributor III
I have not tried it, but is it possible to set a pipeline parameter to zero and then using a mapper to increment the value?
Pipeline parameters are discussed here: https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438254/Pipeline+Properties
- bojanvelevski4 years agoValued Contributor
Try this in a mapper:
$array.map(x=> parseInt(x) < 10 ? '0'+ x : x.toString())
I included parsing of the elements to ensure handling string numbers. Note that the result of the expression will be an array of strings, which is inevitable due to the numbers with a leading zero (<10)
Related Content
- 5 years ago
- 4 months ago
- 10 months ago