Solved

problem with @if stat

Posted on 2001-09-02
10
170 Views
Last Modified: 2013-12-18
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.
0
Comment
Question by:saleemkhan
  • 5
  • 5
10 Comments
 
LVL 8

Accepted Solution

by:
Jean Marie Geeraerts earned 50 total points
ID: 6449782
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
 

Author Comment

by:saleemkhan
ID: 6449813
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
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6449833
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:saleemkhan
ID: 6449869
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
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6449879
Yes, but make sure it's the address book on the server hosting the application and not on local.
0
 

Author Comment

by:saleemkhan
ID: 6449953
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
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6450003
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
 

Author Comment

by:saleemkhan
ID: 6450009
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
 

Author Comment

by:saleemkhan
ID: 6450114
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
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6450124
You're welcome.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question