Need help on User query business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 08:52 PM
Hello,
advance thanks on responding this issue!!
We have requirement to show all users(active and inactive) for managers group only on one of catalog item, tried below code on existing User Query BR
Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 04:20 AM
A Query BR is going to affect the table system-wide. What you need to do is hide the variable set variable on this Catalog Item and create a variable in this Catalog Item to replace it, then change the reference qualifier to add your criteria in the qualifier itself or by calling a Script Include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 07:20 AM
But that particular variable set variable has multiple scripts and it is very painful to update it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 05:22 AM - edited 12-15-2023 05:23 AM
You may try this - In the variable, you can use advanced reference qualifier and add a script, the script checks the sys_id of the current catalog item and only adds the the reference qualifier - "called_from_cat_item=true" if sys_id of current catalog item matches the sys_id of the specific catalog item where you need it.
So your variable reference qualifier script will look something like this
javascript: checkCatalogItem(current.cat_item.sys_id)
and in the "checkCatalogItem" function you do the necessary checks and return the query for reference qualifier accordingly.