How to call script include from System Property?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2021 06:56 AM
Hi, I have a problem. I have to find using script include groups with specific role, which I have done. But now I have to store the values that script include will return in array and store them using System Property. And I do not know how to call script include from system property and store the values there. Thanks for suggestions
System Property
Script Include

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2021 07:08 AM
Hi,
The approach you are using to get group with particular role is not correct. System property hold a constant value and you cannot call script include in the system property.
Anyway if you have a Script Include function to get the array of groups with particular role then you don't need system property. You can call the script include function in almost all configurations elements of ServiceNow.
I would suggest to use same function in your script and avoid using property if your group array is going to change frequently.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2021 07:19 AM
Hi,
I believe you wan this
1) system property should hold group sys_ids as comma separated
sys_id1,sys_id2
2) now in script include after line 6 add this
sysGR.addQuery('group.sys_id', 'IN', gs.getProperty('propertyName'));
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader