Using getReference on Catalog Client Script and I get sysid of location from sys_user table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 04:41 PM
I am using getReference on Catalog Client Script to get information about the Requester from sys_user and i get sysid of the location field.
is there a way to get the Value instead of the sysid?
any help would be appreciated
here is the script below
unction onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var reqByName = g_form.getReference('u_requested_by', callback);
function callback(reqByName) {
var offc = reqByName.u_office.getDisplayValue();
g_form.setValue('u_req_by_office',offc);
g_form.setValue('u_req_by_location1', reqByName.location);
g_form.setValue('u_req_by_location2', reqByName.u_desk_location);
}
}
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 06:17 PM
still pulling sysid on reference fields (office and location)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 06:11 PM
This seems like a good use case for GlideAjax. Please see the link to see if this will help you achieve your goal.