isusermemberofgroups Function

Certified Senior Developer

Hi All,

   I am using the following expression rule to check whether the loggedin user belongs to a group or not. If he/she belongs to a group then it returns "True", otherwise it returns an "Error" instead of returning "False". Please help me to handle this error. Thank you.

For your kind reference,


if(
  isusermemberofgroups(
    loggedInUser(),
    ri!groupIdInput
  ),
  true,
  false
)

Error Occurred

Expression evaluation error at function 'isusermemberofgroups' [line 22]: [InvalidUserException]

  Discussion posts and replies are publicly visible

Parents Reply
  • local!isLeaseGRPMember:a!isUserMemberOfGroup(
    username: local!loggedUser,
    groups: cons!FR_LPI_LEASE_TEAM_GRP_CONSTANT
    ),

    readOnly: if(
    local!isLeaseGRPMember,
    true,
    false
    )

    im using this in interface still i was getting the same error

    Interface Definition: Expression evaluation error at function a!isUserMemberOfGroup [line 3]: [InvalidUserException]

    ------------where line 3 is local!isLeaseGRPMember:a!isUserMemberOfGroup(
    username: local!loggedUser,
    groups: cons!FR_LPI_LEASE_TEAM_GRP_CONSTANT
    ),

Children