- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
07-16-2025 02:08 AM
I'm trying to use var prop = gs.getProperty('some.property.name'); inside a scheduled report (sysauto_report), but the value of prop keeps returning undefined. Can anyone confirm if gs.getProperty() works in scheduled reports, or if there's a limitation in that context?
Thanks,
Pavan.
Solved! Go to Solution.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
07-16-2025 03:42 AM
I believe it has something to do with the sandboxing.
Check this link which talks the same which all classes are not allowed
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
07-16-2025 03:42 AM
in the condition field we can write script
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
07-16-2025 02:36 AM
Hello @pavan_yadav ,
Follow the steps which is provided by @GlideFather , and if your system property is in the scope application, then make sure you are calling from the "name" field instead of the suffix.
Thank you.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
07-16-2025 02:42 AM
Hi @Shraddha Kadam ,
my issue is in the table : sysauto_report has condition field, it is script field there im not able to retrieve the property value. I created a property in sys_properties table, name: schedule, application : global, type: string, and value: sysid of record cmn_schedule table
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
07-16-2025 02:43 AM
Hi @pavan_yadav ,
make sure there is no Typo
gs.getProperty()
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
07-16-2025 02:50 AM
Hi @Chaitanya ILCR ,
my line is 
gs.log(sc); --> it is resulting undefined in sysauto_report tables condition field.
but when I try in background script, I'm able to see the sysid as result.
