so i'm playing with a new system, trying to figure things out before I get in to develop mode full time (the summer) for my schools.
I have a portal on each layout that shows the main layouts a user could click to. I use this with a relationship. Every layout is on the main student table, and it is related to the layout table via the region (students::region = layouts::region). No problem there.
What I'd like to be able to do it have the portal show only those layouts that are relvant to the user's school and position (teacher, admin, office, central). The reason for this is because each of those positions have different places they could go to - and i want to keep the portal uncluttered with irrelevent layouts so that teachers don't access stuff they don't need (the principal's page, for example, or the new student page that the front office uses). Different schools, too have need for access to a few different things (not many, but enough for me to try this out)
Right now I have one script that gets the account name when the user logs in. It sets a $$AccountName, a $$School, and $$Position at login and populates global fields of the same name in the students table, so that the relationship populates the portal.
The relationship between the main table and the layout table is now based on those global fields (students::g_school = Layouts::school and students::g_position = Layouts::position).
Because of this, in my layout table i have records that are very similiar, that only differ by either the school name or the position. I will have:
Students (layout name) KMCP (school) Teacher (position)
Students (layout name) KDCHS (school) Teacher (position)
Is this efficient? Am I going about this the correct way? I'm brainstorming a way to get this to work. One of the big needs we have this year is to allow people into their relevant layouts/tables. Rather than denying them access to layouts that are showing up, i'd like to present the differen types of users with their relevant layouts only.