Transform Script for Reference Field

KristyS
Kilo Guru

I need to transform data into a table with a sys_user.name reference field.    

Source Table field is u_report_owner

Target Table field is u_report_owner

I have added a script on the source field and the data is not transforming into the table.

Can some tell me what I'm doing wrong.  

find_real_file.png

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Kristy,



I think you should be able to do it with out any scripting. Set the choice action to ignore and then the reference field on report owner should get updated if the value already exists in the target table. In reference field name you can point to any column of target table i.e user_name in this case.


View solution in original post

6 REPLIES 6

Lakshmaiah Dump
Giga Expert

Missing table with quotes.


var gr = new GlideRecord('sys_user');



Hit Correct/ Endorsers/ Helpful/ Like depending on the impact of the response


Lakshmaiah Dumpala


KristyS
Kilo Guru

Thank you to   everyone for finding the typo and the guidance.       I have found my mistake as the report owner field in the transform import set table was not set to a reference field.