This sounds correct for a permissions restriction calculation in security for limited editing by a permission group. (I assume your use of the word script was a slip of the finger.)
The RLA calculations are evaluated from the context of full access, so Get( AccountName ) is not returning what you think it is.
Instead, make an unstored calculation field in the table:
Account_Name = Get( AccountName )
Use this calculation in the RLA expression:
table::Salesperson = Account_Name
Is there better way than that to be able to detect the currently logged in user and just look at that? I need it to check to signature field to see if it's empty, and if it is, and the logged in user created the change order (there is a "creator" field that is pulled from their login), they are allowed to edit it. Otherwise if there is a signature in the signature field and if someone else created it, they can't edit it.
You could set the calculation as a Field Validation test, but you have to account for all of the possible "True" results or use NOT to specifically prohibit validation when a specific result is met.
- You must also set the field to not allow user override and to always evaluate.
- That will stop the wrong people from being successful, but it won't stop them from trying to edit it. When validation fails, it won't save their changes. Even that can be a risky implmentation if you have any buttons which commit and bypass the validation tests.
Another idea: You could put a script to run the test from the client level (rather than permissions) as a button on the field itself, only allowing entry if the test passes.
I'm not really sure about your table structure, if I understand you correctly you have an "Order" table and you want two put two rules:
1) No modification after the signature
2) Only the person who created the order is allowed to modify it
You said you have a creator field which makes this really easy to do. Is this field set-up to auto-enter the filemaker account name?
I guess you have a privilege set defined (other than full access) for the sales persons, right? so your first guess was almost correct but instead of
table::Salesperson = Get ( AccountName)
Creator = Get ( AccountName )
Do you have FM12 or FM11, I can upload an example file if you want.
Yes, it is a auto update field that pulls in the Account name upon creation. And we have specific user permissions for Sales, Office, Workers and of course Admin.
I tried "Creator = ( GetAccount )" and it returned "cannot find specific field."
I have FM12.
( GetAccount ) doesn't exist, you need to use Get ( AccountName )
Check the file I attached. There are 2 users ( without passwords):
privilege set: Full Access
privilege set: Sales
Brilliant, thanks Thomas that worked. I appreciate it.