Different Logins = different page/form displayed

What I would like to do is have 3 different levels of login to my db.

This is what I want to achieve.

I am building an app (R5) that will be accessed via a web browser. When  people visit the site they are welcomed and then when moving further inside are challanged to login (this bit I have done). What I would like to achieve is that the person who is accessing the site gets directed to a different page/form/view depending on that login.

Any ideas as to how this would best be achieved are greatly welcome.

TIA
mr880Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alex_GouldCommented:
Hi,

If you setup Roles for each level of user then after they exit the initial page then the WebQuerySave agent can interogate whether they have the Role or not and redirect accordingly.

Use @URLOpen("http://url1") if you are using @Formula or if you are using Script then it's good to have a Computed for Display field (HasRole) at the top of the form determining if the user has the Role,

@If(@IsMember; @UserRoles; "[Role1]"); "Yes"; "No")

and then a simple

if doc.HasRole(0) = "Yes" then
  print "[http://url1]"
else
  print "[http://url2]"
end if

will redirect the browser to that page.

You can also achieve the same effect with JavaScript by creating an HTML text field with the value of HasRole
as it's value. Use this value and set location.href to the URL you want to send them to.


HTH,

Alex
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mr880Author Commented:
Alex,

thanks for that, I think this seems to be along the right lines but I have a couple of things I am not sure about in your suggested answer, and just to say I am pretty new to notes so please bear with me.

The main thing I am confused about is this:

Even if a user is assigned a certain role the app won't know what it is until they have logged in.

The way I have the app set up at the moment is like this: I have a domain that I have registered, lets say www.mynotesapp.com when people go there they get a welcome screen and a link that says login. Clicking on the link brings up the login dialog then takes them to a new page. I was hoping that the new page they would be taken to would reflect who they logged in as but I am begining to think this might be impossible.

I have chosen this approach because I don't want to end up with a long URL that ends with &login.

Do you think that I should use a holding page that sits between the Initial welcome page and the page I want the person to eventually see.
That way the person would have logged on to the DB and the holding page could contain the code to redirect them where I want? Also is there any benefit to be had from using ACL groups as opposed to Roles

I do appeciate your help on this and have upped the points to 200 accordingly, just let me know what you think of this last suggestion and they are yours.

TIA
0
mr880Author Commented:
Adjusted points to 200
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.