How to create a multiple conditions in UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2015 06:42 AM
Hi,
Could you please help in creating a multiple condition check in UI Action condition.
1) i want to check if state == "open" UI action should be visible to only ITIL
2) if state == "work in progress" ui action should be visible to "change_admin" roled users.
thanks in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2015 06:48 AM
It would be something like the following where you change out the state values for the correct numbers:
current.state == 2 && gs.hasRole('itil') || current.state == 3 && gs.hasRole('change_admin')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2015 06:59 AM
Hi Brad,
I tried with the same condition , but it is not working.
condition:
(gs.hasRole('itil') && !current.isNewRecord() && (current.state != '5' && current.state != '4' && current.state != '3')) || (gs.hasRole('change_manager') && (current.state == '11' || current.state == '9'))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2015 07:04 AM
Can you write is words what are you trying to achieve in this condition, so that I can evaluate this.
Regards
Pratul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2015 07:07 AM
Actually i trying to get the " i want to restrict the users to view the UI action in state "11" and "9" to only "change_manager and rest of the states itil users can access the UI action.