- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2020 12:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2020 12:09 AM
Hi Henry,
unfortunately you could not since gs.getProperty('name') only works in server side
Also performing GlideRecord in client side is not recommended
Are you referring to use that in onload client script of some table; if yes then you can use display business rule on that table; get the property value and store in scratchpad variable and use that variable in onload client script
BR:
g_scratchpad.propertyValue = gs.getProperty('property_name');
Client Script:
function onLoad(){
var propertyValue = g_scratchpad.propertyValue;
}
If you are referring to using it in catalog then perform GlideAjax and use script include to get the value and return it from function
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
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-29-2020 12:09 AM
Hi Henry,
unfortunately you could not since gs.getProperty('name') only works in server side
Also performing GlideRecord in client side is not recommended
Are you referring to use that in onload client script of some table; if yes then you can use display business rule on that table; get the property value and store in scratchpad variable and use that variable in onload client script
BR:
g_scratchpad.propertyValue = gs.getProperty('property_name');
Client Script:
function onLoad(){
var propertyValue = g_scratchpad.propertyValue;
}
If you are referring to using it in catalog then perform GlideAjax and use script include to get the value and return it from function
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2020 06:07 PM
Hi Ankur,
How do you do it for a global business rule. The type When=display option it not available.
Regards,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2020 10:09 PM
Hi Peter,
don't do it for global table; example below for incident table:
BR: when -> display
Client Script:
function onLoad(){
alert(g_scratchpad.propertyValue);
}
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
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-29-2020 12:30 AM
Hi Comp,
1.Create a script include.Use gs.getProperty in that script include.
2.Call the previously created script include from client script.
Please mark correct or helpful if this solve your issue.
Thanks,