How to check if the user that triggered the process belongs to a group at XOR node?

Certified Associate Developer

Hi community members,

So in a process model, I added a XOR node. In the condition I put "=a!isUserMemberOfGroup(loggedInUser,  a!groupsByName("Test group"))". The purpose is if the user belongs Test group it will go to path A. If not it will go to path B. So I'm sure the loggedInUser belongs to Test group, however when testing, after this XOR node it goes to path B.

Did I make some mistake on that expression? I tried "=a!isUserMemberOfGroup(pv!loggedInUser,  a!groupsByName("Test group"))" and it was not working too.

Any suggestions?

Based on suggestions,  I created a constant for the group and use the expression a!isUserMemberOfGroup(loggedInUser(),cons!TEST_GROUP) . However it still didn't work as expected in the XOR node (not outputing "true"). But when I test the expression outside of the process, it outputs "true". So I'm wondering what's potential issue here?

Thanks.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    Hello  ,

    As Sriram said, try to check if the function returns expected output in an expression.

    Sometimes, when you try to run an expression with a!groupsByName() function, it may not return the expected group when you don't have permission to see that group. Please check the Group Visibility once and try, if that helps.

    To know more about the function, refer link . Please go through the usage consideration once.

Reply
  • 0
    Certified Associate Developer

    Hello  ,

    As Sriram said, try to check if the function returns expected output in an expression.

    Sometimes, when you try to run an expression with a!groupsByName() function, it may not return the expected group when you don't have permission to see that group. Please check the Group Visibility once and try, if that helps.

    To know more about the function, refer link . Please go through the usage consideration once.

Children
No Data