Newbies YellowBird Posted July 7, 2021 Newbies Posted July 7, 2021 I have a FM file with Students and Classes, each record has a unique ID and are connected via a join table. Each student can have more than one class. Students can not change their classes, only the Admin. I want each student to be able to see the student data of those who have at least one of the same classes. Any suggestions on how to set this up?
comment Posted July 8, 2021 Posted July 8, 2021 One way you could set this up is to have the startup script navigate to the user's record and populate a global variable with a list of the related classes IDs. Then allow the users to view records in the Students table when: AccountName = Get ( AccountName ) or not IsEmpty ( FilterValues ( $$myClassesIDs ; List ( Classes::ClassID ) ) )
Newbies YellowBird Posted July 8, 2021 Author Newbies Posted July 8, 2021 I don't understand where the above allow statement goes, in a perform find?
comment Posted July 8, 2021 Posted July 8, 2021 No, it goes into the definition of the students' privilege set. Maybe you need to better explain what you mean by: 23 hours ago, YellowBird said: I want each student to be able to see the student data of those who have at least one of the same classes. I understood it as "deny access to records of students that do not have any class in common with the current student user" - but your response suggests you may have meant something else. If you want to create a found set of all students that share at least one class with the current student, you could do: Go to Related Record [ Show only related records ; From table: “Courses” ] Go to Related Record [ Show only related records ; Match found set ; From table: “Students” ]
Recommended Posts
This topic is 1289 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now