Using Member of condition for a UI action how can i assign multiple groups

kumar_a
Kilo Explorer

I am trying to restrict the Ui action button only to certain groups

gs.getUser().isMemberOf('group1'&&'group2') this doesn't work

1 ACCEPTED SOLUTION

Community Alums
Not applicable

try gs.getUser().isMemberOf('group1') && gs.getUser().isMemberOf('group2')



Do you really want AND here, or do you want OR?


View solution in original post

6 REPLIES 6

Community Alums
Not applicable

try gs.getUser().isMemberOf('group1') && gs.getUser().isMemberOf('group2')



Do you really want AND here, or do you want OR?


the button must be available for Bothe the groups


Then it is OR Condition


gs.getUser().isMemberOf('group1') || gs.getUser().isMemberOf('group2')


srinivasthelu
Tera Guru

HI Kumar,



Why cant you write this as


gs.getUser().isMemberOf('group1') && gs.getUser().isMemberOf('group2')




Thanks


Srini