July 7, 20214 yr Newbies 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?
July 8, 20214 yr 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 ) ) )
July 8, 20214 yr Author Newbies I don't understand where the above allow statement goes, in a perform find?
July 8, 20214 yr 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” ]
Create an account or sign in to comment