Hi all,
I want datamapper to take the vaules from two field and combine them into one field with padding to one cell, the input file is a .csv and lets call he field IMID and MARK, in short in excel this would be: =TEXT(IMID,“0000000000”)&MRK
Any tips?
Try this:
("0000000000"+data.extract('IMID',0)).slice(-10)+data.extract('MRK',0);
or even better (didn’t realize padStart() was available):
(data.extract('IMID',0)).padStart(10,"0")+data.extract('MRK',0);
Thanks Phil,
Could not get the padding one to play ball but the 1st one worked like a treat and now I can add and remove data into new fields to my hearts content!