Version 4 onwards includes a new feature for checking group membership. A new lookup was included to use the internal functions for determining group membersup
Group membership using a lookup
The new lookup has the following format:
(!groupmember name="Full Name" group="group name" type="OLD"!)
Parameters
name
The name to checked for in the group. This should be fully distinguished name, not the abbreviated user name.
The lookup (!username!)
can be used to determine the sender's Full Name.
group
The address book group to be checked.
type
This is an optional parameter. This can only be set to "OLD".
By default the checking of group members is performed by a domino API. When the OLD parameter is set the application will perform a manual check by checking each group. This method is slower.
This option is useful when group member are in an internet addresses format.
Return Value
This lookup will return the text @True if the user is a member of the group or @False if they are not a member.
Examples
This example is from a sub signature formula, to determine if the sender is a member of the "Sales" group.
@If((!groupmember name="(!username!)" group="Sales"!);@True;@False)
Version 3 method
This example shows how to setup a lookup that tests for group membership. This can then be used in sub signatures.
Create a lookup that returns a text list containing the members of a group.
GroupMailBox is the group name
Send a test email to ensure that the members of the group are returned in a list.
Create a second lookup to test that the current user is a member of the group
strMembers:=@Explode('(!GroupMembers!)';':'); @if(@IsMember(@UserName(0);strMembers) ;'@true';'@false')
The above formula returns the text @true or @false. This can then be used in other formulas.
Example is a sub signature
When the sub signature formula is evaluated, the lookups are parsed first.
a. (!GroupMemberTest!)
will evaluate to either @True or @False
b. (!intext type="extl"!)
will evaluate to either @True of @false.
The final formula will be (if the email is external and the user is a member of the group)
@If(@true & @true);@true;@false)