I have searched the forum but still can’t figure out how to write this correctly.
I am trying to hide an action button on a form. The form has fields named Status and Approver and I’m using an ACL role called ADM. I only want the button displayed if the following conditions are met.
Status is set to “Pending” AND the current user is listed as the designated Approver or the current user has the ADM role.
I have tried different variations and this was my last attempt:
!(Status = “Pending”) & (@IsMember(“[ADM]”; @UserNamesList)) | !(Status = “Pending”) & (@Name([CN];@UserName) = Approver)
Subject: Another hide-when question
It is sometimes helpful to think of the imaginary “display-when” formula, which would be:
Status = “Pending” & (@Name([CN];@UserName) = Approver | @IsMember(“[ADM]”; @UserNamesList)
and then make it negative:
!(Status = “Pending” & (@Name([CN];@UserName) = Approver | @IsMember(“[ADM]”; @UserNamesList))
Subject: RE: Another hide-when question
It’s funny how the brain works because it does seem easier to look at it as a show-when instead of a hide-when. I will definitely keep that mind. Thanks for the tip.
Subject: Another hide-when question
@if( status = “Pending” & ( @isMember( “[ADM]”;@USERROLES) | @NAME( [CN];@USERNAME) = APPROVER);@FALSE;@TRUE)
Subject: RE: Another hide-when question
I was so close, yet still so far away. That works like a charm. Thanks for the quick response John!