- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 11:39 PM
Is there any params available in api call to check whether that table has more rows ?
For instance,
Setting sysparm_offset - 1 & sysparm_limit - 10 will retrive the 10 records from the table.
(At this point i am not aware whether that table has more rows or not )
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 01:58 AM
Dear @Adithya Khurana
In the response, you can access the sysparm_total_count
value to determine the total number of records in the table. If the sysparm_total_count
is greater than the sum of the offset and limit, you can conclude that there are more rows available.
ex:
GET /api/now/table/<table_name>?sysparm_offset=0&sysparm_limit=10&sysparm_total_count=true
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 12:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 01:47 AM
Thanks !!! I need to fetch incident data's in batches and will be writing for further reports and etc. So instead of checking for empty resultJson was looking for direct parameters.
If no direct Param , will do the empty check on retrieved result. Thanks again!!! (Or if there any other alternate way kindly share)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 03:03 AM
what you have mention is connect , you can use empty check on retrieved result.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 01:58 AM
Dear @Adithya Khurana
In the response, you can access the sysparm_total_count
value to determine the total number of records in the table. If the sysparm_total_count
is greater than the sum of the offset and limit, you can conclude that there are more rows available.
ex:
GET /api/now/table/<table_name>?sysparm_offset=0&sysparm_limit=10&sysparm_total_count=true
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....