Populate a reference field from an import by using the field id instead of name

Mark OToole1980
Tera Contributor

I have a requirement to populate a users department using the id of the department rather than the name.  When I use an update excel sheet on the sys_user table with the name, it transforms perfectly, but when I try to use the departments id field, the transform ignores this and leaves blank.  How can I achieve this?  Any help very much appreciated.

 

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Mark OToole1980 

So the field map for your department field has Referenced value field name

Set it with id field if excel contains the department id

AnkurBawiskar_0-1749129788433.png

 

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

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

Hi Ankur, I have tried this, but every time I resubmit the update excel sheet the new transform map is create which keeps setting to ignore and removes the value here

MarkOToole1980_0-1749130632723.png

 

Sourabh Pariwal
Tera Contributor

Hi @Mark OToole1980,

 

Retrieve department details directly from the department table (cmn_department) instead of using a reference from the user table, and map them accordingly for the transformation.
Hope this will resolve the issue.