Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Records Custom Privilege Set for Related Table Access

Featured Replies

  • 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 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.

 

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.