Link to home
Start Free TrialLog in
Avatar of saleemkhan
saleemkhan

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of Jean Marie Geeraerts
Jean Marie Geeraerts
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of saleemkhan
saleemkhan

ASKER

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.
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.
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?
Yes, but make sure it's the address book on the server hosting the application and not on local.
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.
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.
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.



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



Lets meet again,


saleem.
You're welcome.