Gliderecord in reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2016 02:32 AM
Hi, am new to servicenow, am working on reports module. I need to know where I can write a gliderecord query to fetch the data..? Revert to this query is much appreciated. Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2016 02:58 AM
Can you detail a bit what exactly you want to achieve?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2016 03:08 AM
Thanks for ur reply.. i need to fetch a record from incident table using gliderecord query. I don wanna go to reports module by doing manually. How can I achieve this.. Pls help me..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2016 03:11 AM
Like this:
var gr = new GlideRecord('incident');
gr.addQuery('number', 'INC123456');
gr.query();
while(gr.next()){
//do something
}
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2016 03:10 AM
I did something similar, hope it helps you too
My Scenario: Pull all incidents where assignment group is any of the groups i am member of(some users are members of many groups).
Solution :
Create a dynamic filter, which will call the script include and there you can write your glide record.
In the report add the filter like:
<assignment Group> <Is Dynamic><The Dynamic filter you created>