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

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.


Yes I really agree with pradeepksharma



No need to write any Transform script to map the fields, you can directly map the source field to Service-now target field.




Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

I have updated the field in the table with the sys_id however the display name is not display in the field. How do I get the field to populate with the name field.



I've tried gr.sys_id.getDisplayValue(); & gr.name;


I attempted this first and was unsuccessful which led me to creating the script for the field.