this is a bit heavy-handed, I think, but on the layout that you want to prevent editing on, choose a field that when populated should render the record uneditable. Create a script that looks like
Then, in layout mode, select all fields and set the OnObjectEnter script trigger to run this new script.
This will immediately jump out of any field clicked or tabbed into if Date1 is populated.
1 of 1 people found this helpful
In manage | Security, you might make this "lock expression:
IsEmpty ( Deposits::DepositTotal ) or
Deposits::DepositTotal <> Deposits::cDepositTotal
Where DepositTotal is a number field where you enter the total and cDepositTotal is defined as Sum ( Donations::Amount)
You can use this to lock both the donations and deposit tables.
this is exactly my intension. but i am new to FM so I dont know how to lock the tables
Make a copy of your file so if you make a mistake and lock yourself out of your file, you can revert to the back up copy that doesn't yet have a password set.
Open Manage | Security and add a new account and give it a new privilege set.
In the Menu Options drop down in the bottom right corner, select the option for "all". You may want to change it later, but this is one that trips up a lot of new developers when they leave it as "minimal" and then the user can't find menu options.
In the Records section, select "custom privileges". This opens a dialog where you can select a table from your file and then you can set options for how/if they can veiw, edit, create or delete records in that table. For each of these, there's a drop down where you can select "limited..." to open a calculation dialog where you can put in an expression such as I suggested.
Note that a script can be set up with "relogin" to log you in on the limited access account or back in with full access and this can save a lot of opening and closing the file when testing your access permission settings.