Restrict Available Catalog Item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 08:47 AM
Hello,
I'm writing a Before BR Query to restrict the available items in the Catalog Item list when adding questions to a report.
Current script:
Two questions:
1. Should the BR be triggered on the main report table "task", sc_cat_item, or question_answer:
2. Am I missing anything in my script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 09:20 AM
Hi
If the table for this Query BR is sc_cat_item, isn't the field being queried sys_id?
current.addCondition( 'sc_cat_item' , 'IN' , arrAllowedCatalogItems.join( ',' ));
↓
current.addCondition( 'sys_id' , 'IN' , arrAllowedCatalogItems.join( ',' ));
First of all, User Criteria can be used for catalog items.
If User Criteria meets your requirements, we recommend using User Criteria rather than Query BR.
Also, if simple conditions are sufficient for the restrictions, consider using ACL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2024 08:00 AM
Thank you for the update.
I was unsure which table to use for the Query BR as the report is using the "incident" table and we wanted to restrict the items listed when users want to add variables/variable answers as columns for records submitted through a Record Producer.