Ui action visibility based on Assignment Group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 06:27 AM
Hi All,
There is one requirement "Action" button will be visible for 15 assignment groups. we can add condition in condition field of Ui action, but there is string length limitation. is there any other approach to achieve this requirement?
Condition: gs.getUser().isMemberof('xyz') || gs.getUser().isMemberof('abc') || gs.getUser().isMemberof('pqr') || gs.getUser().isMemberof('srp') || gs.getUser().isMemberof('wer') || gs.getUser().isMemberof('uio') ||gs.getUser().isMemberof('xyz1')
Please assist here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 06:35 AM
You can write script include and call your script include in UI action condition. That way you can achieve this scenario.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 06:46 AM
@abirakundu23 : In this case, you can convert your condition check to script include and call script include from the UI Action Condition field. Please refer the below articles which might help you with the structure.
https://www.servicenow.com/community/itsm-forum/how-to-call-script-include-in-ui-action/m-p/478829
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.