scheduled import job

chercm
Mega Sage

i am using a walkup experience user badge table and a sql server with badge numbers and facility number . i will be using scheduled import job to import the user badge details to the user_badge table in servicenow . 

 

But the badge information from the sql data is having xxxx:xxxx , how can i extract the number after the colon during the import process to be place into the badge column in the user_badge table ?

29 REPLIES 29

@Ankur Bawiskar  do you mean it should not happen?

does this work ?

Ensure that the target field in the ServiceNow table is defined as a string (or a text field) rather than a numeric field. This way, the leading zeros are preserved during the import.

@chercm 

ensure the import set field is of type string

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar  tried your script . it is not getting the expected result . for example the user_badge column on the sql 00235:1234 . after the transform with your script is showing as 002351234. 

@chercm 

can you share your complete script?

Script I shared should work fine and also mention/share screenshot where have you written that

source script.gif

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader