Product and version: Database hosted on FileMaker Server 16.0.4 and accessed via FileMaker Pro 17.0.2, 16.0.5, 15.0.4.
OS and version: macOS High Sierra 10.13.6
Hardware: iMac (late 2015)
Description: I set up the View calculation for two of the tables in the database to compare values in a field and in a global variable; e.g. CreatedBy = $$HAS_ACCESS. If this returns true, then the user is able to view the record. I am able to view the records as expected when I'm on a layout based on that table. But searching on "*" doesn't retrieve the records as expected. (Searching on "=" and then omitting the request does work correctly.) And when the record is viewed as a related record, the relationship doesn't match the related record as expected; i.e I'm on a record from table A and have fields from related table B displayed on that layout, and the table A record should match a record in table B, but the related fields show as empty.
I've found a few older reports of behavior similar to this:
- 2008: Using Global Variables in Privilege Sets does not work with find mode - Security Concepts - FMForums.com
- 2014: Privilege set record level access based on global variable or calculated field??
- 2016: Record Access Privileges - Global Variables - Find Error
There is a comment in the latest of these that claims this issue was fixed in FM 15, but it seems to still be there.
How to replicate: The behavior is consistent in the database where it's been observed. I tried recreating it in a brand new file but was not able to.
Workaround: Use global field instead of global variable.