problem with @if stat

hai experts,
@If(@name([cn]; @username) = "test user";
"page1"; "page2").this formula will work only for a single user.user other than "test user" it wont work for other users.Now i want to use the same formula for more users more than 200 users.so how i can give the formula as dynamic.I want to display the perticular page for some users only like for 30 users.how can we do it?
waiting for reply.

saleem.
saleemkhanAsked:
Who is Participating?
 
Jean Marie GeeraertsConnect With a Mentor Application EngineerCommented:
There are a few steps to take :
1) Put the people that need the page displayed in a group in your company's public name and address book.
To do this, just open the address book in your notes client (it will be located in the server's root directory with a name like "xxx's Address Book").
Go to the groups view, click the Button "Add group" to create the new group. Enter a name and description for the group. Select "Access Control List only" for the Group type. Use the arrow next to the Members field to add the users to the group. Click "Save and Close" to save the group.
2) Create a role in the ACL of your database.
When you opened your database, click on File, Database, Access Control List. You will get the ACL management dialog box. On the left, click on Roles. Now click "Add..." Enter a name for the role, e.g. HOME
The role will be listed as [HOME]. (Don't close the dialog box yet)
3) Assign this role to the access group you created earlier.
Select "Basics" at the left in the ACL dialog box.
Click "Add..." and type the name of the group you just created or click on the button next to the input field to select it from your Address Book. Click OK and the group will appear in your ACL list. Now select the group by clicking on it once, set the "User type" (on the right) to "Person Group" and in the bottom-right corner select the role you just created by clicking on it once. (You will notice a checkmark appearing before the name of the role).
4) Finally : your formula should be the following :
@If(@IsMember("[HOME]"; @UserRoles); "page1"; "page2")
This formula will check if a user has the role [HOME], if it does, it will display page1, if not it will display page2.
You have to be careful not to make a typing error here, because the group names are case-sensitive. (So "Home" is not the same as "HOME")

If you need further assistance, let me know.
0
 
saleemkhanAuthor Commented:
i have the acl of the database as

default :designer
admin   :manager
Anonymous:noaccess.

if i created the role and gave permissions as u said and for the group as desinger for the person will it authenticate login the users means first it should authenticate and then enter the frameset of the datbase will it do?

wiaitng for reply.

saleem.
0
 
Jean Marie GeeraertsApplication EngineerCommented:
Roles are assigned the moment you open the database. If anonymous is set to "No Access" you have to authenticate. Once you're authenticated Notes knows to what groups you belong and therefore the roles will work.
People that are not in the group, won't have the role "[HOME]" and therefore will see a different page.
Just try it, you'll see it works as it should.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
saleemkhanAuthor Commented:
ok now i have a small doubt.to create a group u want me to open the address book the and then add group.am i correct?
0
 
Jean Marie GeeraertsApplication EngineerCommented:
Yes, but make sure it's the address book on the server hosting the application and not on local.
0
 
saleemkhanAuthor Commented:
hai jerrith,
  as u said i created the group of the address book name "group1".in the group i added two persons.
  created the role name "home"
  persongroup    check mark home.

now i created page that contains html so i want to display this page for perticular person in the down frame.

so i did like this.

frame properties: named element page
            name test.html
  and the formula
@If(@IsMember("[home]"; @UserRoles); "test.html"; "")

when i close this i am getting invalid or non existent doucment.what may be the error.

invalid or non existent document means it not identifying the page or is there any error in the formula.

what may be the error.

waiting for reply.

saleem.
0
 
Jean Marie GeeraertsApplication EngineerCommented:
It's the "" (to display nothing) in the formula that causes the error. I've tried it in a test database of my own and you can ignore the error.
To prevent the error put the name of an existing alternative page.
0
 
saleemkhanAuthor Commented:
hai jerrith,
  now i tried like this
@If(@IsMember("[home]"; @UserRoles); "first"; "second")

if i give blank instead of second i am getting invalid or non existent document.
Now i am not getting any error but the problem is who ever logs in its displaying the second page not the first where i done the mistake.

can u please help me in this.


waiting for reply.

saleem.



0
 
saleemkhanAuthor Commented:
hai jerrith,
  Thank u very much for valuable information.Its working great. i need the same help in future also.



Lets meet again,


saleem.
0
 
Jean Marie GeeraertsApplication EngineerCommented:
You're welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.