Solved

problem with @if stat

Posted on 2001-09-02
10
167 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
 

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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now