We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

UI Action Condition for custom table state filed choices

Rajesh Bandila
Tera Contributor

Hi,

 

I have an requirement to make it UI Action available when state value is 17,18 &19 and user is member of the "Network" and "Software" groups. I have written the below ui action condition, but it's not working as expected. Please help & correct me on this? 

(current.state == 17 || current.state == 18 ||current.state == 19) &&(gs.getUser().isMemberOf('Network') || gs.getUser().isMemberOf('Software'))

 

Thanks In advance!!

1 REPLY 1

Sagar Pagar
Tera Patron

Hi @Rajesh Bandila,

 

The conditions seems to be fine. What is the expected behavior here?

 

Try with -

(current.state == '17' || current.state == '18' || current.state == '19') && (gs.getUser().isMemberOf('Network_group_sys_id') || gs.getUser().isMemberOf('Software_group_sys_id'))

 

Thanks,

Sagar Pagar

The world works with ServiceNow