- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 07:27 PM
When auto-populated one reference field with another (both from the sys_user table), the DisplayValue for the auto-populated field doesn't transfer from the Catalog Item to the RITM. I am submitting the request as a local Admin. So, security permissions shouldn't be an issue (I have verified there are no ACL's preventing this).
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 08:27 PM
Hi @appstorm,
if c_num is a variable on your catalog item. Please try accessing it with:
ritm.variables.c_num
Similarly, if student_information is a variable, try:
ritm.variables.student_information
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 08:10 PM
Thanks for the response! I am attempting to transfer - via script in workflow editor.
(function() {
var ritm = current; // The current RITM record
// Ensure that c_num is populated (this field will be used to match u_employee_number)
var cNum = ritm.c_num;
if (cNum) {
var studentRecord = new GlideRecord('sn_uni_req_larf_banner_student');
// Query the sn_uni_req_larf_banner_student table to find the record where u_employee_number matches c_num
studentRecord.addQuery('u_employee_number', cNum);
studentRecord.query();
// Check if a matching record is found
if (studentRecord.next()) {
gs.info('Found matching student record where u_employee_number = ' + cNum);
// Populate the student_information field on the RITM with the sys_id of the matching student record
ritm.student_information = studentRecord.sys_id;
// Update the RITM record
ritm.update();
gs.info('Populated student_information on RITM with sys_id: ' + studentRecord.sys_id);
} else {
gs.info('No matching student record found for c_num: ' + cNum);
}
} else {
gs.info('c_num is not set on RITM: ' + ritm.sys_id);
}
})();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 08:27 PM
Hi @appstorm,
if c_num is a variable on your catalog item. Please try accessing it with:
ritm.variables.c_num
Similarly, if student_information is a variable, try:
ritm.variables.student_information
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 08:24 AM
ritm.variables.c_num solved it! Thanks so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 08:29 PM
if your u_employee_number holds employee number of user then update as this
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
03-19-2025 11:24 PM
were you able to find th question..?