UI Action Condition

MWright1
Giga Guru

Hi All,

I need help with my condition.

I need this new UI Action in the Incident to show up when (all three conditions MUST be respected):

1. I have the service_desk role.

2. The assignment_group in the incident is not "2b086a4f1bdc75503604a7d4bd4bcba0"  (see note below)

3. The assignment_group in the incident is not "adefbfb647598ad06e249da3636d4399"  (see note below)

 

Note:

For 2 & 3, basically, this button should show up if the Assignment group is anything else EXCEPT these two: "2b086a4f1bdc75503604a7d4bd4bcba0"  & "adefbfb647598ad06e249da3636d4399".

 

I have been able to do #1 with this condition:

gs.getUser().hasRole('service_desk')

 

When I try to incorporate even just the one with:

gs.getUser().hasRole('service_desk') & current.assignment_group != "2b086a4f1bdc75503604a7d4bd4bcba0";

 

The button disappears.  I have also tried:

gs.getUser().hasRole('service_desk') & current.assignment_group != "2b086a4f1bdc75503604a7d4bd4bcba0" & current.assignment_group != "adefbfb647598ad06e249da3636d4399"

 

Nothing worked.  Please help.

 

Thanks,

M

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @MWright1 ,

Please try thie below 

 

gs.hasRole('service_desk') && current.assignment_group != "2b086a4f1bdc75503604a7d4bd4bcba0" && current.assignment_group != "adefbfb647598ad06e249da3636d4399"

I tried this in my PDI and it works fine for me 

 

 

Please mark my answer correct and helpful if this works for you

 

Thanks and Regards 

Sarthak

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

Hi @MWright1 ,

Please try thie below 

 

gs.hasRole('service_desk') && current.assignment_group != "2b086a4f1bdc75503604a7d4bd4bcba0" && current.assignment_group != "adefbfb647598ad06e249da3636d4399"

I tried this in my PDI and it works fine for me 

 

 

Please mark my answer correct and helpful if this works for you

 

Thanks and Regards 

Sarthak

Ranjit Nimbalka
Mega Sage

Hi @MWright1 ,

 

when you are adding and condition operator should be logical operator i.e. && , || so just replace that like below.

 

gs.hasRole('service_desk') && current.assignment_group != "2b086a4f1bdc75503604a7d4bd4bcba0" && current.assignment_group != "adefbfb647598ad06e249da3636d4399";

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Ranjit