April 16, 201411 yr Newbies Hello, I'm having some trouble on creating a Privilege Set..I don't know if it suposed to work differently but maybe someone has a different solution. Here are the tables: - I have 2 related tables : Student and Disciplines ( Disciplines::ID_Rel = Student::ID ) - I have 3 records in Student ( Tom , Jim , Bob ) each having 3 records from Disciplines ( 9 records in total ). Student Disciplines Name Title Tom Math English Physics Jim German Math French Bob Chemistry Physics German What I am trying to do : - I have professors for each disciplines (many professors to each disciplines).They have to access only students wich have their disciplines (Math, English....). What doesn't seems to work: - I've created a privilege set for each disciplines. Each professor has his own account and a privilege set (depending on his discipline). For example the privilege set for ProfessorX is Math. Privilege set Math has Custom Privilege Set of the Records : At table Disciplines in View is Limited with the following Calculation : Disciplines::Title=Get(AccountPrivilegeSetName) ProfessorX (Math PrivilegeSetName) can access Tom but not Jim records. It seems that it is the same for German PrivilegeSetName who can access Jim but not Bob. I don't know if it is a problem with FIlemaker or it is something that cannot do regarding related tables. The security only takes first record from the related table for calculation. I found a way to go arround with inserting the some Title fields also into Student table (Title1,TItle2,... depending on the number of Disciplines) and set Custom Privilege Set of Table Student : Title1= Get(AccountPrivilegeSetName) or Title2= Get(AccountPrivilegeSetName) or Title3= Get(AccountPrivilegeSetName)..... Is there another way to do this Custom Privilege Sets without creating fields in table Student? Anyone have a clue about this? Thanks.
April 16, 201411 yr You might want to try storing the list of disciplines in a field in the student record: DisiplineList = List( Disciplines::Title ) Then your security calc would be: not IsEmpty( FilterValues( Get(AccountPrivilegeSetName); DisiplineList ) ) This might get slow if you get into hundreds of thousands of records, but should be fast enough for what I imagine is a typical year's enrollment. But for best performance, I do recommend storing the list rather than calculating it on the fly.
Create an account or sign in to comment