Hi All,
I am getting error in below expression
a!localVariables( local!userName: "xyzUser", if( isusernametaken(local!userName), a!isUserMemberOfGroup(local!userName, cons!PP_GROUP_CONSTANT), 0 ))
Error as
Expression evaluation error at function a!isUserMemberOfGroup [line 5]: [InvalidUserException]
I observed this issue with deactivated user in only one environment where in lower environment its working fine with deactivate users as well.
Thanks in Advance!
Discussion posts and replies are publicly visible
I believe that you need to pass the User as a type User by :
touser(local!userName)
I don't think it is a version issue. What Appian version are you using?
Even a deactivated user will return true for isusernametaken(). But a!isUserMemberOfGroup() will fail on that exact user. To check whether a user is deactivated, you will need to user the function isuseractive() out of the people functions plugin.
its 21.4 on both environment.
Hi Stefan,
Thanks for reply.. but this function is working properly in one of the environment with deactivate user as well and not in other.
Thanks for reply. Tried this, its still not working.
I think it is untrue. It works equally well for a deactivated user as well.
If you're seeing exactly the same expression behave differently in different environments then I would suggest opening a support ticket.
Thanks Peter. Will check on this.
I just did a small test to verify this. isusernametaken() returns true, regardless of whether the user is deactivated or not. a!isUserMemberOfGroup() returns an error for any deactivated user.
Appian 22.2.