Using getReference on Catalog Client Script and I get sysid of location from sys_user table

Mohamed4
Tera Contributor

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);
}

}

6 REPLIES 6

still pulling sysid on reference fields (office and location)

Robert Smith
Tera Expert

This seems like a good use case for GlideAjax. Please see the link to see if this will help you achieve your goal.