Transform Map, Employee ID input into Assigned To field in Hardware Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2024 05:17 AM
Any approach on how to input Employee ID into Assigned To field in hardware table that shows the name of the user of the corresponding employee ID using transform script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2024 06:48 AM
Hi @Cent,
To clarify your question, when populating the Assigned to field on the hardware form, you wish you ensure both the Name and the Employee ID are visible and searchable.
To implement this, there are a couple of steps.
Firstly, you need to ensure this data is available against a user. Do you currently store the Employee ID? You've mentioned Transform map so I'm assuming this is something you need to import.
This in itself is quite a simple step, however, you need to make sure you update the Employee ID against the User (sys_user) table and coalesce against a unique field when importing/loading the data such as email address which is typically a good unique field.
Once this data is available (or if it is available already today against users), you then need to configure the 'Assigned to' field on the Hardware form. As this is commonly used, make sure you use a Diction override on the Attirbutes column with the following syntax:
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=employee_number (or whatever field name you wish to display here)
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.

Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2024 07:07 AM
Hi @Robbie,
Thanks for the help! But isn't it also achievable by using only transform script? i have done a script for this so far
var assignedto = new GlideRecord("sys_user");
assignedto .addQuery("field from sys_user", source.getValue('u_employeeid');
assignedto .query();
if(assignedto .next()){
target.assigned_to = assignedto .sys_id;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2024 01:57 AM
Hi @Cent,
Can we clarify your question and requirement here - am I right in understanding that when a user is populating or typing in the Assigned to field on the hardware form, you wish you ensure both the Name and the Employee ID are visible and searchable.
As in if I start typing either your name or your employee ID - it should show a match against you and your user profile?
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.

Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2024 07:13 AM
Hi @Robbie ,
Thanks for the help! But isn't it achievable only using transform script? this is what i have done so far
var assignedto = new GlideRecord("sys_user");
assignedto .addQuery("field from sys_user", source.getValue('u_employeeid');
assignedto .query();
if(assignedto .next()){
target.assigned_to = assignedto .sys_id;
}