How to check is member and NOT a member of assignment group in UI action condition?

Virendra K
Kilo Sage

Hi All,

 

Requirement is,

suppose there are 2 assignment groups ( Test AG1 and Test AG1 ). If the user is member of these group then UI action button should be visible from New to Implement state and any user is not a member of Test AG1 and Test AG1 groups then UI action button should be visible only when change is in NEW state.

 

How to check NOT a member of assignment group condition along with first part of the condition in UI Action condition ?

 

Regards,

Virendra

 

1 ACCEPTED SOLUTION

Nishant8
Giga Sage

Hello @Virendra K , can you try below condition and share the outcome?

(gs.getUser().isMemberOf('Test AG1') && gs.getUser().isMemberOf('Test AG2') && current.state < 0) || (!gs.getUser().isMemberOf('Test AG1') && !gs.getUser().isMemberOf('Test AG2') && current.state == -5)

 

please note that above mentioned condition should work fine if user is not part of any of the groups - Test1 and Test2. Consider a case where user is part of either one of the groups; in such case, modify the condition accordingly.

 

Regards,

Nishant

View solution in original post

1 REPLY 1

Nishant8
Giga Sage

Hello @Virendra K , can you try below condition and share the outcome?

(gs.getUser().isMemberOf('Test AG1') && gs.getUser().isMemberOf('Test AG2') && current.state < 0) || (!gs.getUser().isMemberOf('Test AG1') && !gs.getUser().isMemberOf('Test AG2') && current.state == -5)

 

please note that above mentioned condition should work fine if user is not part of any of the groups - Test1 and Test2. Consider a case where user is part of either one of the groups; in such case, modify the condition accordingly.

 

Regards,

Nishant