Validations on MRVS - validate Employee ID

Ankita9793
Tera Contributor

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?

 

 

Ankita9793_1-1754997864453.png

 

Ankita9793_2-1754998212706.png

 

 

1 ACCEPTED SOLUTION

@Ankita9793 

then in script include itself have the logic I said

-> make Employee ID as reference to sys_user then you are sorted.

            if (req_type == 'Modify' || req_type == 'Add' || req_type == 'Change / Move') {

                // GlideRecord to sys_user with employee ID and get sysId, firstName, lastName and set in below object

                obj.employee_id = row[headers[0]];
                obj.firstname = row[headers[1]];
                obj.lastname = row[headers[2]];
            }

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

5 REPLIES 5

stanisj
Giga Contributor

I previously implemented a similar requirement using an MRVS to validate Employee IDs against the sys_user table, which worked well. Now, I am populating stockroom assets via an Excel upload. While the initial import identifies duplicates correctly, I need to ensure that if a user manually edits a row, the system still checks if the serial number exists in the alm_asset table.

Currently, I have a 'Status' column that flags duplicates during the initial load. How can I trigger this same validation dynamically when a user modifies a serial number directly within the MRVS row?