Facing an issue while customising an OOB script for Product Offering Eligibility in ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 06:41 AM
We're currently modifying the out-of-the-box script include to return an encoded query based on a combination of two fields. While the script works correctly when returning a single field condition, it fails when we append multiple conditions using the ^ operator.
This seems to break the query formation unexpectedly — has anyone encountered this issue before or found a workaround to ensure the combined conditions are evaluated properly?
Any insights would be greatly appreciated. Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 10:35 AM
Hi @ankitbanerj
usually when the ^ operator isn’t properly escaped or the syntax isn’t clean.
If you're building the encoded query dynamically in your Script Include, make sure you're not adding spaces around the ^, and also wrap conditions in parentheses if needed. Here's a quick example:
If you're concatenating, try:
Also, check if any of the field values have special characters that need escaping. please drop the script lets see if anything is missing in script itself.
If this helps kindly accept the solution thanks much.
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
Microsoft MVP (AI Services), India
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2025 09:35 AM
Hi @Its_Azar ,
thanks for your reply!
I have checked that we are building proper query with the '^' operator, still it is not working. We did raise on HI ticket they also don't have a solution for now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
@ankitbanerj Are you trying to setup eligibility rules to filter the products in the catalog that the Sales Agent can see?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @RanjaniR correct, I am trying to setup eligibility rules to filter the products in the catalog that the Sales Agent can see?