How do I set a user's department? (The department must be identified by its code, not its name)

Rie3
Tera Contributor

I am importing/updating a user table from an excel file using the standard functions. I have entered department names in the department field of the import file.
If there is more than one department with the same name, the import will fail because the department record cannot be identified. (There are multiple departments with the same name but different parent divisions.)
To avoid this, we would like to import by entering the department code in an excel file, etc.

Could you tell me how this can be done?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Rie3 

for the same field map of department field in your staging table you can give the dept_code as field name in referenced value field name -> ensure you give correct field name for reference table i.e. department table's field

like this

AnkurBawiskar_0-1669112904370.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

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Rie3 

for the same field map of department field in your staging table you can give the dept_code as field name in referenced value field name -> ensure you give correct field name for reference table i.e. department table's field

like this

AnkurBawiskar_0-1669112904370.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

@Rie3 

Thank you for marking my response as helpful.

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

Rie3
Tera Contributor

Many thanks.