Thank you for the post.
A previous user encountered this issue with limiting portal view access in IWP here:
The workaround is to place $$clinicID into a regular global text field (not an auto-enter), and limit the record access such that TableA::Field = ID_Clinic where field is the value of $$globalVariable instead of a global variable itself.
Let me know if any of the above requires additional clarification.
Thanks, that workaround seems to have fixed my issue.
What I did for my solution:
- Create a global text field in my z_References table, that all tables can see.
- In my startup script, change Set Variable [$$clinicID; Value: Get ( AccountPrivilegeName )] to Set Field [z_References::z_ClinicID; Get ( AccountPrivilegeName )]
- Change all of my custom record view privileges from Table::ID_Clinic = $$clinicID to Table::ID_Clinic = z_References::z_ClinicID
OK, so I finally got this up to a FileMaker Server, and the workaround only kind of works for Web Direct.
When the layout is loaded, or when a it is reloaded by doing a GTRR to a different record using the same layout, the portal(s) are blank again (and Hide Objects When conditions are not evaluated for objects in the portal). By clicking pretty much anywhere, the portals do load their data, but having the portals appear blank by default wasn't very user friendly.
I tried all the standard script steps to get this to load automatically (Commit, Go To Object, Go To Field) but nothing worked until for whatever reason I tried to pause the script. So my workaround to get portals to display data in web direct immediately when the portal's table has conditional permissions based on a global field is this:
- Pause/Resume Script [Duration (seconds): .1]