- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi All,
I have a MRVS with 3 fields, Employee ID, First Name and Last Name.
It gets populated from Excel attachment, I want to validate the Employee ID against sys_user table. How can I achieve it?
Also, is it possible to set First name and last name based on the employee id's populated thought attachment?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
then in script include itself have the logic I said
-> make Employee ID as reference to sys_user then you are sorted.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
You could change the Employee ID variable to a reference, or add a new reference variable then either have the Excel import UI Action use the ID to do a GlideRecord on the sys_user table to return the sys_id to populate in the reference variable, or run another script after the import. The same script can return the name fields from the user record to populate the other MRVS variables. If you're having trouble with the script, post the attempt with the current process that is populating the Employee ID using the insert code </> icon and we'll get it sorted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
how are you populating?
if you make Employee ID as reference to sys_user then you are sorted.
When excel is loaded, ensure only those user records are considered in MRVS which are present in sys_user table.
the logic which sets the MRVS rows simply set the user sysId, user first name and user last name in those MRVS columns.
please share some details on how that excel data is getting stored in MRVS rows
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @Ankur Bawiskar
We are using the below Script include and Client script to populate the MRVS based on attachment upload.
Script Include :
OnChange Client Script on Attachment field :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
then in script include itself have the logic I said
-> make Employee ID as reference to sys_user then you are sorted.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader