Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3885 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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 CalculationDisciplines::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.

 

Posted

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.

This topic is 3885 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.