Hide/When formula

I am modifying a hide/when formula that has this code …

@IsNewDoc | @Trim(RegisteredAttendees) = “” | @Date(@Now([ServerTime] : [LocalTimeOnError])) > ClassDate

It works well, but I want to add the following condition …

There is a field I want to check to see if the user is listed and I need to check to see if the user is in the admin role. Something like …

@IsNotMember(@Name([CN];@UserName);RegisteredAttendees) | @IsNotMember(“[DBAdmin]”;@UserRoles)

Because of the way @UserRoles works, I can’t include it in the first list, (at least not that I know). I had the code to be …

@IsNewDoc | @Trim(RegisteredAttendees) = “” | @Date(@Now([ServerTime] : [LocalTimeOnError])) > ClassDate | (@IsNotMember(@Name([CN];@UserName);RegisteredAttendees) | @IsNotMember(“[DBAdmin]”;@UserRoles))

but this doesn’t work. Hide/whens can be tricky, I have this issue before, but I can’t remember the fix.

any ideas???

Subject: Hide/When formula

list1:= (@Name([CN];@UserName) : (“[DBAdmin]”;list2 := RegisteredAttendees : @UserRoles;

@IsNotMember(list1:list2)

Retuns 1 only if any elements in list1 do not match any in list2.

If you want to hide the button or field with this:

list1:= (@Name([CN];@UserName) : (“[DBAdmin]”;

list2 := RegisteredAttendees : @UserRoles;

@IsNewDoc | @Trim(RegisteredAttendees) = “” | @Date(@Now([ServerTime] : [LocalTimeOnError])) > ClassDate | @IsNotMember(list1:list2)

this should hide the button.

Make sure you have this property checked “Enforce a consistent Access Control List across all replicas” in the “Advanced” section of AccessControl List.