@ISMember Question

I have a table that looks very similar to an Excel spreadsheet. Each cell contains multiple fields. I need to hide some of those fields in the cells from some users. I originally used the “Hide Paragraph If True” field option with the formula to hide if:

(@Name([CN];@UserName)= “John Doe” |

@Name([CN];@UserName)= “John Smith” |

@Name([CN];@UserName)= “Your Name”)

but quickly realized I am dealing with too many names and this would also cause constant maintenance in the application.

I then decided to still use the “Hide Paragraph If True” option but using an ACL Group and the @IsMember function however Notes doesn’t like the syntax of the formula I am using: @IsMember(“Table_Restricted_Users”)

I am trying to hide this cell from this user if they are a member of that group.

What is the correct syntax for this to work? I have searched for @IsMember and could not find an example that fitted my application. Thanks.

Subject: @ISMember Question

How quick is that? 3 answers and all correct within about 3 minutes!

Subject: @ISMember Question

Hi,

If you want a user is belonging to a group then use the below formula

@IsMember(“Table_Restricted_Users”; @UserNamesList)

HTH

Keshava

Subject: RE: @ISMember Question

Keshava.

What you suggested was exactly what I was looking for:

@IsMember(“Table_Restricted_Users”; @UserNamesList)

And thanks to all for the good suggestions!

Subject: @ISMember Question

I usually use roles for this, and a hide when like so:

@IsNotMember(“[Admin]”; @UserRoles)

Subject: @ISMember Question

I think your understanding of the function @ismember is at fault. What it’s supposed to tell you is whether a value is in a list. It requires 2 parameters (that’s the source of your error). The first parameter is the value you are looking for, the second parameter is the list you are searching.

So @IsMember(“Fred”; “Barney”:“Wilma”:“Fred”) returns 1 or @True because “Fred” is in the list "Barney . . . etc.

Looking at what you want to do, in order to give this level of fine-grained access, I generally use Roles. Then you can change the visibility of the elements depending on whether the user holds specific roles.

So user Fred could be set up in the ACL with role “Manager”. Joe, on the other hand, does not have the “Manager” role. The hide when formula could then say something like:

@isNotMember(“[Manager]”;@userRoles);

and the relevant paragraph would be shown to Joe, because the element “[Manager]” is in the text list returned by @UserRoles.

For Joe, though, the paragraph would be hidden because the element “[Manager]” would not be in the text list returned by @UserRoles.

** Caution ** This is not a good way to hide confidential information, as the fact that text is hidden does not stop it being retrieved. In many cases, though, it does suffice.

HTH

Subject: @ISMember Question

If you have this group “Table_Restricted_Users” in ACL of your database, the you can use this formula to restrict these people to view some field data:

Hidewhen formula:

@IsMember(“Table_Restricted_Users”; @UserNamesList);

Example:

If John Smith is a member of this group: Table_Restricted_Users

then he will be restricted to see some fields whose hidewhen contains the above formula.

Subject: @ISMember Question

@ismember only checks to see if a text value exists in a text list. Firstly, you are using the wrong syntax. @ismember requires 2 parameters. You are trying to use the function to check if the user is present in a group defined in the NAB. To use it in this way, firstly lookup the NAB and store the list of users in a variable and check is the user belongs to the list.

I would suggest creating a role in the db ACL and associating it to the group. Then your hidewhen can be as simple as

@ismember(“[XXXX]”;@userroles)