- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2019 02:09 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2019 02:14 PM
Hi Amit
U r going to this link
https://community.servicenow.com/community?id=community_blog&sys_id=19ace225dbd0dbc01dcaf3231f961948
Thanks,
Rahul Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2019 05:29 PM
So just give the table name in the query above and you will get the desired results.
gr.AddQuery('name', 'IN', 'incident,problem');
And you are already doing a count so you should be good to go.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2019 05:31 PM
FYI my query is counting all the table rows and not particular table. All the tables are by default stored in sys_db_object. If you look at the query which I supplied I am first querying that table to get all the table names and then I am querying individual table to get the row count. As you said that you want it for incident, problem then you can add a filter in that and the query will run only for those table names.
Hope it makes sense. Reach out to me if you have any questions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2019 02:14 PM
Hi Amit
U r going to this link
https://community.servicenow.com/community?id=community_blog&sys_id=19ace225dbd0dbc01dcaf3231f961948
Thanks,
Rahul Kumar