How to create a multiple conditions in UI Action

RamSagar
Tera Guru

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.

9 REPLIES 9

Brad Tilton
ServiceNow Employee
ServiceNow Employee

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')


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'))


Can you write is words what are you trying to achieve in this condition, so that I can evaluate this.



Regards


Pratul


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.