- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2016 09:28 PM
Hi ServiceNow Developers,
Is there a way to limit a button/UI action to only appear in certain custom application modules?
Example: I'm trying to create a custom application that is using the "sc_req_item" table to create 3 different list view.
I tried to create a button/UI action for the users to print what is on the list. But since I am using the "sc_req_item" table the button will also appear in the default "Requested Items" module under the Self-Service app of ServiceNow since it is dependent on the same table.
Your suggestions would be highly appreciated.
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2016 09:37 PM
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.
http://wiki.servicenow.com/index.php?title=UI_Actions#Restricting_Access_to_UI_Actions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2016 09:33 PM
Hi April,
You want to restrict it based on views or table?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2016 09:37 PM
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.
http://wiki.servicenow.com/index.php?title=UI_Actions#Restricting_Access_to_UI_Actions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2016 11:56 PM
I've implemented it by View Level Control and it worked!
Thanks Pradeep

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2016 09:39 PM
Hi April,
If you are setting a specific view for your list of records, you can use it in the UI Action's condition:
RP.getParameterValue('sysparm_view') == 'myapp_view'
See if that works for you.
Thanks,
-Brian