Any way to workaround?
Use a script, performed by the OnFirstWindowOpen Trigger (See File Options), to set a global field or variable to Get ( accountName ). Set up your "lock expression" to reference the value of the global field or variable instead of Get ( accountName ).
(I seem to recall another developer trying to use get ( Layoutname ) who encountered the same limitation so I suspect that Get functions don't update correctly in these Lock expressions...)
Thanks, Phil… I will try that out.
I suppose that FileMaker's Record Access Privileges don't understand how to evaluate the Get functions. I wish that FileMaker Inc. would fix this!!
But I will try your workaround in the meantime. Thanks!
That seems to be the problem here, I suppose… FileMaker should really make those Record Access Privileges evaluate as Unstored Calcs instead of Stored Calcs.
scotty321 and PhilModJunk:
Thank you for your posts.
At this time, FileMaker Pro will not support unstored calculations in a privilege set. I recommend that you enter this suggestion into the Feature Requests web form at:
The entries into this web form populate a database that is hosted by Product Management and Development, where each suggestion is discussed and considered for possible implementation in a future release. Although I could copy your post(s) and paste them into the web form, there are a couple of questions asked that only you can answer.
Maybe i misunderstood, but maybe not...
I am unable to replicate Scotty's issue unde both FMP 12 and FMP 13, since there is no need to unstored calc to do that.
What i have done :
Created a little db with one table and few fields on it.
Created few nominative accounts related to a new custom privilege set that allow to view all record but edit or delete only their own created record.
Exception : If AccountName is "Phil", which is an account using the same privilege set, you can do all edition.
Here is my test file. No Password. Admin (Full Access) by default.
I am curious what i have miss...
Thanks for posting, Fred. It looks like you have stumbled upon something interesting here. FileMaker Inc. really needs to fix this bug on their end, as there seems to be absolutely no consistency going on within FileMaker Pro. Check this out, and you'll see how confusingly bad this was designed by FileMaker Inc.! There are 2 parts to your calculation… this is what your calculation looks like:Account_Name = Get ( AccountName )orGet ( AccountName ) = "Phil"The top part of your calculation:Account_Name = Get ( AccountName )actually works within FileMaker! FileMaker responds to this properly!So this would be a great way for FileMaker to evaluate the editing of records!However, the bottom part of your calculation fails (which is what I was originally trying to do):Get ( AccountName ) = "Phil"If you just leave this bottom part of your calculation within FileMaker, FileMaker chokes and doesn't know what to do. It locks everyone out of all the records.So, I have no idea why FileMaker is okay evaluating this expression:Account_Name = Get ( AccountName )But meanwhile, FileMaker has no capability to evaluate this expression:Get ( AccountName ) = "Phil"Very frustrating and very annoying.Thank you for posting! Hopefully, the FileMaker engineers will look at your file and will be able to fix this in a bug fix update to FileMaker 13.
Sorry, my bad. You are right… your file DOES work! I was logging in as Fred, not Phil. Your file actually proves that this works the way that I wanted it to work!
So what TSGal said above about unstored calculations doesn't seem to be true… as far as I can tell from your file. Your file is evaluating unstored calculations just fine in the Access Privileges for custom editing of records.
I don't understand why your file works, but the file that I created in FileMaker doesn't work at all. On my end, FileMaker lets EVERYBODY always edit the record, no matter which account they're logged in with… even if they don't match the AccountName listed in the calculation. This is incredibly frustrating on my end. :( I still can't figure out why my file isn't working… I'm using the exact same calculation that you have in your file, yet it doesn't work in my own file. :( Very sad. :(
Thanks so much for your input, Fred!
What TSGal said is certainly true since she talks about unstored calculation fields, that you cannot on a privilege formula indeed.
But it doesn't matter since we don't need to use any unstored calculation in our case. I think it was just a wrong track. If your file is failing to do the trick, it must be by another cause.
You are saying our formula are the same. So, the problem is elsewhere… Maybe your system works but the test is wrong.
Maybe you should verify if the account you used to test was the correct account ?
It must be an account associated to your customized privilege set.
The string tested must be the exact same as the account name ("scott" or "Scott" but not "Scott " nor "Scotty" ).
I know it seem basic, but sometimes, where the most difficult was done, a tiny or detail or basic error will cause the test fail.
I think ALL reverifying is your next step.