developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


Hide-when woes - multiple conditions required
Mark XY Brown 12/02/2011 11:25 AM
Domino Designer 6.0.3 Windows XP

Hi All

I have a need to hide an action button from everyone bar those who fall into the intersection of two groups, and I can't grasp the required logic for it. Last night's office Christmas party might have something to do with this...

Anyway, the conditions are as follows:
- Must be a member of the group "Service Delivery"
- Must have the role "[Admins]"

In this database are documents created with the form "AppActGroup", which is used to define groups. The members field is set to Names, Allow multiple values. The role is attached to various entries within the ACL.

There are currently three people who should be able to see this button, one of which is the authorised design profile that we use to sign design changes. I have set up a test document that confirms that this profile is both in the required group and has the required role, but the action remains invisible. The formula I'm using is as follows:

tmp1:=@IsMember("[Admins]"; @UserRoles);
tmp2:=@IsMember(@Name([CN]; @UserName); @Explode(@DbLookup("":""; ""; "AppGroups"; "Service Delivery"; 2)));
@Sum(tmp1; tmp2) !=2

The view "AppGroups" contains a comma-separated list of the names of the group members in the second column, using the following formula:

@Implode(@Name([CN];GroupMembers); ",")

What am I doing wrong?

Go back