02/08/2023 05:00 PM
Hi. Is it possible to add zero left padding for a value received into the importUserJson? Right now the field receive 13 but need to be saved as 013.
thanks
02/08/2023 06:12 PM
Which connector ? its possible in rest
02/09/2023 04:29 AM
Yeah, this is for rest. didn't find any syntax on your link for left pad on your link. And also what is the language? sql?
02/09/2023 06:21 AM
@rushikeshvartak Ive tried "COSTCENTER":"#CONST#${String data1 = LPAD(Job.CostCenter,3,0); return data1 }~#~char"
but in the Cost center field it add the whole value {String data1 = LPAD(Job.CostCenter,3,0); return data1 }
02/09/2023 07:53 AM
"COSTCENTER": "#CONST#${String data1 ='0'; String data2 = response.<variable path to cost center>; res = data1 + data2; return res }~#~char"
Thy this
02/09/2023 08:42 AM
02/09/2023 08:50 AM
Can you please share sample response API response and also full importJSON you can mask the client specific information
02/09/2023 09:23 AM
@sk Sorry, I copy paste without changing the placeholder you add. Will tried again with what @rushikeshvartak put.
but I'm not sure it will work. From what I understood, both syntax add 0 at the front of the value. I really need a Left padding. because cometime the value is 111, or 13, or 1, so 13 need to be 013 and 1, 001.
02/09/2023 08:52 AM
"COSTCENTER": "#CONST#${String data1 ='0'; String data2 = response.Job.CostCenter; ret = data1 + \" \" + data2; return res }~#~char"
02/09/2023 09:37 AM - edited 02/13/2023 03:54 AM