Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Unable to convert sys_id into Names. Help!!!

Pankhil
Tera Expert

Unable to convert sys_id into Names. Help!!!

Current codes works and returns 

find_real_file.png

When the line in orange is enabled.

find_real_file.png

But the underlying function does run Scripts-Background. 

find_real_file.png

find_real_file.png

function onChange(control, oldValue, newValue, isLoading) {

var access = g_form.getReference('access_level', getAccess);
function getAccess(access)
{
g_form.setValue('time_spec_group',access.time_spec_group);
//g_form.setValue('access_approver',getApprovers(access.access_approvers));
g_form.setValue('access_approver', access.access_approvers);
}


}

function getApprovers(List){
var outString = [];
for(i=0;i < List.length; i++)
{
var user = new GlideRecord('sys_user');
if(user.get(List[i]))
{
var username = user.name;
outString.push(username);
}
}
return outString;
}

1 ACCEPTED SOLUTION

Pankhil
Tera Expert

Ended up going with GlideAjax

Script Include

find_real_file.png

 

Catalog Client Script 

find_real_file.png

View solution in original post

5 REPLIES 5

Glad, you implemented this using glide ajax. 

@Pankhil 

Do you need any further help on this? 

If your query has solved, Kindly mark the answer correct and close this thread.