populate field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2023 12:24 AM
how to populate a custom field from a table by using reference table data

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2023 12:27 AM
Hi @lakshman nalla,
You are going to have to give more detail than this, to get a satisfactory answer.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2023 12:38 AM
hi @Pmeter Bodelier ,
I'm trying to auto populate employee's manager by using another table's data, in these two table we have employee number is common. while I'm entering the employee name- manager name should auto populate here employee name is a reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2023 12:43 AM
Are you using any script to autopopulate manager field?
share your script if you have written
Thanks,
Manjusha Bangale

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2023 12:49 AM
Hi @lakshman nalla,
Allright, then you would need to use a Business rule, which may look something like this, assuming this is triggered from user record:
Of course you will have to adapt the table and field names to your situation
var manager = new GlideRecord('<<usermanagertablename>>');
if (manager.get('<<employeenumberfield>>', current.getValue('user_name'))){
var managerUser = new GlideRecord('sys_user');
if (managerUser.get('user_name', manager.getValue('<<managerusernamefield>>'))){
current.manager = managerUser/getUniqueValue();
}
}
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.