UI Action Condition - multiple conditions not working

SandyL83
Tera Guru

Hello,

I have a UI action and I need to add 2 conditions to the "Condition" of the UI Action. 

The logic is if user has demand_screener role AND state is 8, 28, or -4 OR if user has demand_manager role AND sate is not 8, 28, or -4 

Here is the code i have and it's not working. Any ideas? 

(gs.hasRole('demand_screener') && (current.state == '8' || current.state == '28' || current.state == '-4')) || (gs.hasRole('demand_manager') && (current.state != '8' || current.state != '28' || current.state != '-4'));

1 ACCEPTED SOLUTION

Aman Kumar S
Kilo Patron

Hi @SandyL83 ,

 

Try below condition:

 

(gs.hasRole('demand_screener') && (current.state == '8' || current.state == '28' || current.state == '-4')) || (gs.hasRole('demand_manager') && (current.state != '8' && current.state != '28' && current.state != '-4'));

 

Best Regards
Aman Kumar

View solution in original post

2 REPLIES 2

Aman Kumar S
Kilo Patron

Hi @SandyL83 ,

 

Try below condition:

 

(gs.hasRole('demand_screener') && (current.state == '8' || current.state == '28' || current.state == '-4')) || (gs.hasRole('demand_manager') && (current.state != '8' && current.state != '28' && current.state != '-4'));

 

Best Regards
Aman Kumar

SandyL83
Tera Guru

Thank you Aman!!! That works perfectly!!!