"Group by" in report causes Security Constraints
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2017 02:19 PM
I have a script include that accepts in a table, field, and custom query and displays duplicate values. I use this script include within a filter to build certain reports. The reports display the exact information I'm after, but whenever I try and specify a field to "Group By", I get the Security Constraints message below.
I've tried enabling debugging to highlight what ACL may be missing, but I wasn't able to find anything obvious. As stated above, if I don't choose a field to "Group by", the report runs perfectly and displays the records I'm looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2018 09:17 AM
Hi Nick,
I have the same result with a similar use case (using a script include filter). Did you find any workaround or solution to this bug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2018 09:28 AM
Unfortunately I was never able to find a solution. Please update if you find a solution of your own.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2018 11:56 AM
Hi Nick,
Thanks for the quick answer.
In my case I was able to solve my issue by modifying my script include and the way I call it.
To find cases where a user has more than X asset of a model, I needed to do a GlideAggregate call and use the addHaving function. So to be able to do that GlideAggregate call I needed to pass the query I wanted in the client script include so I was for example passing: install_status!=7^model_category=81feb9c137101000deeabfc8bcbe5dc4
During troubleshooting I found out that if a was passing a query that did not contain "^", it was working correctly with the group by. So my first thought was to encode "^" so to send "%5E" and in my script include I would decode it. This worked well for list but did not work in reports. I did some debugging and it seems like my script include was receiving the decoded version, also when saving the record the "%5E" was being decoded.
So for the moment, my workaround will be to use a custom character to replace "^" for the moment I chose to use "|" but other characters might do the job, the only issue would be with a character that you actually want to use in the query.
Then in my script include, I have the following script line to put back the "^" before doing my query.
encodedQuery = encodedQuery.replace(/\|/g, '^');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2021 01:34 AM
Same problem 3 years later...
Did anyone ever find a solution for this when creating a report?
Since we can't use a script include when users want to group something in a report on a dashboard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2021 05:34 AM