Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

GlideAjax returning null

nishmi
Kilo Contributor

I'm trying to convert List Collector sys_ids to user names using GlideAjax. and setting returned names in another field. The List Collector returns comma-separated sys_ids, which I pass to a client-callable Script Include. However, the GlideAjax response is always null.

Catalog Client Script

nishmi_0-1783159346541.png


Script Include

nishmi_1-1783159385974.png

I checked log 

 gs.info("Debug ids" + ids); return user sysid
 gs.info("Names" +names.join(',')); return user name, but glideajax response is null.
4 REPLIES 4

Bhavya11
Kilo Patron

Hi @nishmi ,

 

Please change the name of script include in both script include side as well as catalog client script. 
more information refer this thread 

 

While ServiceNow has one OOTB API's that use the method name getName(). here is document link . 
Root cause may have been an internal naming conflict in that specific context or scope. Since the method worked immediately after renaming.  
If this information proves useful, kindly mark it as helpful or accepted solution.

Thanks,
BK

Ankur Bawiskar
Tera Patron

@nishmi 

try creating fresh script include and another function name

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

yashkamde
Mega Sage

Hello @nishmi ,

 

may be there naming conflict as I have seen multiple questions with same issue..

Screenshot 2026-07-07 144529.png


Refer this for detailed understanding :

getName() 

 

If my response helped mark as helpful and accept the solution.

mohammedafi
Tera Contributor

Hi @nishmi,

 

Please see the line 11 in your script include. if u wish to send user name as comma seperated value u need to type gr.name.getDisplayValue(); or put the respective field name you wish to get the display value of

Thanks,
Afif