Problems populating reference field from transform map

robhaas
Tera Contributor

I am importing approver data into a custom table "appr". The data being imported only contains the employee number for each approver but no other information. I am mapping the source employee number to the target appr table field "u_approver". This field is a reference field to the sys_user table. I searched here and found a post that says   I should change the Referenced value field name to "employee_number". I have done this and attempted to re-import, but the reference field stays blank.

I added a gs.log to the import and validated that my employee number is coming in just fine for each entry. It is just not populating the approver field. The referenced value field name I am using is employee_number.

The post I was reviewing is Re: populate reference field using transform map scri

Anyone have any thoughts on what I may be doing incorrect?

b-rad Tagging you as you were able to assist in the other post.

Thanks for any assistance.

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Robert,



If excel has added decimals and the like, then using the oob functionality to match the employee number field on the user table may not work as I believe it would have to match exactly. One thing to try would be to change the field type of the employee number field on your import table (not the user table) to an integer to prevent the .0 . The other option would be to use a before transform script to manipulate the value as prasun suggested.


View solution in original post

5 REPLIES 5

robhaas
Tera Contributor

Disregard. I went the first approach of setting the referenced value field name now that the employee number does not have the extending .0 This has worked and resolved my issue. Thanks for all of the help!