Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Reference value field name

jacopo_pulici
Kilo Contributor

Hi guys,

I need your with a specific requirement.

I have in place a web service that pulls in some data. It works, all good.

I need to insert one of this data (Employee Number) in a custom table referenced field (referenced to the sys_user table).

My goal is to pass the employee number obtained by the Web Service (and that is actually already present in the sys_user table) and then automatically fill in the reference field in the sitcom table, matching the related User Name from the sys_user table.

I'd like to basically script what already happens in the transform map, selecting the Reference value field name.

Thank you,

Jacopo

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Jacopo,



Why not use reference field name if you are already getting the employee number from third party and that column exists on user table?


Do you want to go with source script for this field map instead of direct mapping?



Regards


Ankur


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

Hi Ankur,


I can't use the transform map since I'm using a Web Service to pull in the data.


Therefore I need to script this in order to run it at scheduled time (every night I need to pull in new data, if any).


Thank you,


Jacopo


taylor21
Mega Expert

Did you ever find a solution for this? I am trying to do the same thing...

Swati44
Kilo Expert

Even I have the same question, did you get the answer?