How to restrict UI action button based on modules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 07:42 AM
Hi,
We have two modules with same table with different filter conditions. How we can restrict list banner button based on list filter conditions ?
Thanks,
Pihu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 07:50 AM
Hi Pihu,
View Level control :
You can use the UI Action Visibility related list to restrict a UI action by specific views.
The UI action is available for a given view according to the following rules:
- If there are no visibility rules, the action appears on all views.
- Any exclude rule on a given view means the action does not appear on that view.
- If there is at least one include rule, then the action appears only on views that are specifically included.
Condition level control :
To control base on tables you can use the condition something like for ex current.sys_class_name = "sc_req_item"
The above condition will make sure that the button will be visible only for table sc_req_item.
Also, refer to this article:
https://community.servicenow.com/community?id=community_blog&sys_id=865da629dbd0dbc01dcaf3231f961936
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 07:59 AM
Hi,
You can review this thread and see if this will assist you.
This "should" allow you to grab the filter and then the condition would be met or not, but it may require page load versus static page with just the list changing. You'd have to try it and see: https://community.servicenow.com/community?id=community_question&sys_id=c4e91bdbdb89e300e0e80b55ca96...
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!