- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
I have a servicenow connector from a Copilot agent, but it is erroring due to the size of the returned data. I'd like to reduce the returned records to a manageable amount, but how can I do that? I already tried adding ^sysparm_record_count=10 to the end of the string, but it doesn't seem to have had any effect. To be certain, I even reduced it to 2 records, but the result is the same. It says the return is too large which suggests I'm using the wrong limiter.
I have searched online and in documentation, but not found an answer.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
Try ^sysparm_limit=10
Please mark the answer correct/helpful accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
It's not working, but since you an Viraj both listed this as the answer, I'll assume it's correct. If you have any idea why I'd still be be getting a "output too large" error on my CoPilot agent, I'm love some advice:
This is what the core part of my query is: dateBETWEENjavascript:gs.beginningOfLastWeek()@javascript:gs.endOfToday()^sysparm_limit=2
So it will get articles that meet my other conditions, but SHOULD limit it to 2 which shouldn't overload the query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
Hello @jeremyduffy
The parameter to limit the number of records returned is sysparm_limit.
example : /api/now/table/{table_name}?sysparm_query=priority=1^active=true&sysparm_limit=10
If my response has helped you, hit the helpful button, and if your concern is solved, do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello @jeremyduffy
Your current query snippet:
dateBETWEENjavascript:gs.beginningOfLastWeek()@javascript:gs.endOfToday()^sysparm_limit=2
In a proper URL structure, this entire string is likely being treated as the value for the sysparm_query parameter
.../api/now/table/kb_knowledge?sysparm_query=dateBETWEENjavascript:gs.beginningOfLastWeek()@javascript:gs.endOfToday()^sysparm_limit=2
When ServiceNow processes this:
It sees the entire string as a single filter condition.
The carat (^) is interpreted as an AND operator for filtering.
It attempts to find records where the date condition is met AND where a field named sysparm_limit (which doesn't exist on the table) equals 2.
Since the API parameter sysparm_limit is not seen, the system proceeds to return all records that match the date condition, leading to your "output too large" error.
The request URL should look like this:
/api/now/table/{table_name}?sysparm_query=dateBETWEENjavascript:gs.beginningOfLastWeek()@javascript:gs.endOfToday()&sysparm_limit=2
If your CoPilot agent uses a structured connector interface, do not concatenate the full string. Instead, provide the parameters in their respective fields:
Parameter Name | Value |
sysparam_query | dateBETWEENjavascript:gs.beginningOfLastWeek()@javascript:gs.endOfToday() |
sysparm_limit | 2 |
If my response has helped you, hit the helpful button, and if your concern is solved, do mark my response as correct.
As per the new community feature, you can mark multiple responses as correct.
Thanks & Regards
Viraj Hudlikar.