Keith,
I put the answer to your question posed in a private email here, for forum user's benefit.
You question:
<<
I am tring to help a school set up their WAS login. What they want to do is have the nornal Login ie User name and Password, but depending whether they are Admin, Teacher or Pupil will determin which page opens next for them. Only the Classes for the logged in Teacher can be seen by that Teacher and likewise only data for that Pupil can be seen by the logged Pupil.
>>
In the users table have a field for User_Type (or similar). Choices there are Pupil, Admin, Teacher. In the LoginDialog's AfterValidate event, set a protected variable to whatever is in that User_Type field. Also set the Security Level for each, from lowest to hightest, 1=Pupil, 2=Teacher, 3=Admin.
To accomplish what I think you want, you don't really have to "send them to a different page" depending on their status. Have everyone go to the same page with a Main Menu using Alpha Navigation component. Use the Security Levels to determine who sees what menu option.
Now, assuming one of those options available to all was See Your Class Listing (or similar) you will need a Case statement inside the A5W page with the grid that shows your class listing. This statement will selectively filter the data depending on their User_Type. That would look similar to this:
I put the answer to your question posed in a private email here, for forum user's benefit.
You question:
<<
I am tring to help a school set up their WAS login. What they want to do is have the nornal Login ie User name and Password, but depending whether they are Admin, Teacher or Pupil will determin which page opens next for them. Only the Classes for the logged in Teacher can be seen by that Teacher and likewise only data for that Pupil can be seen by the logged Pupil.
>>
In the users table have a field for User_Type (or similar). Choices there are Pupil, Admin, Teacher. In the LoginDialog's AfterValidate event, set a protected variable to whatever is in that User_Type field. Also set the Security Level for each, from lowest to hightest, 1=Pupil, 2=Teacher, 3=Admin.
To accomplish what I think you want, you don't really have to "send them to a different page" depending on their status. Have everyone go to the same page with a Main Menu using Alpha Navigation component. Use the Security Levels to determine who sees what menu option.
Now, assuming one of those options available to all was See Your Class Listing (or similar) you will need a Case statement inside the A5W page with the grid that shows your class listing. This statement will selectively filter the data depending on their User_Type. That would look similar to this:
Code:
if eval_valid ("session.User_Type") then select case session.User_Type = �ADMIN� tmpl_Jobtracking.DBF.filter = your filter here case session.User_Type = �PUPIL� tmpl_Jobtracking.DBF.filter = your filter here case session.User_Type = �TEACHER� tmpl_Jobtracking.DBF.filter = your filter here case else tmpl_Jobtracking.DBF.filter = your default filter here, if applicable end select end if
Comment