What version of FMP are you using? If you're using FMP 10, you could set up a script trigger.
I am using FMP 8. Should I upgrade?
I don't know. That's a question that involves a lot more than just this one feature.
There are ways to use password privileges to control access to records on a record by record basis in your version of FMP. Some others have posted questions on this so you might want to search the threads and see what you find.
Thanks Phil I will look further in the forum for more info.
These solutions work in FMP 9. I don't have FMP 8 to verify but you are welcome to try as it costs a lot less than upgrading to FMP 10 :smileywink:
There are a couple of options available to you depending on whether you want to lock individual fields or the entire record.
To lock individual fields:-
• Add a checkbox field (I'll call it 'Access') with a Value List with one value = "Public" (or whatever text you like) to the table and layout.
• For each field you want to protect, edit the Field Options and choose 'Validated by calculation' in the Validation tab. Specify the calculation:
Access = "Public"
• Uncheck the 'Allow user to override during data entry' checkbox.
When the Access checkbox is unchecked (i.e. not Public) on the layout, users will not be able to commit any changes they made to your protected fields.
If you would rather lock the entire record, please post again and I will add the steps to setup the account privileges accordingly.
Jade, you are a miracle worker! it worked just fine, thank you. If you have time I would appreciate the formula to lock the whole record as well. Thank you again!
To lock the whole record:
This method creates a new Privilege Set that you must assign to all accounts that you want to control. If you already have a predefined privilege set, you may want to edit it instead.
I assume for this example that you have setup a checkbox field called "Access" with the value "Public" on your table and layout
• Choose the menu item: File>Manage>Accounts & Privileges…
• Click the "Privilege Sets" tab
• Click the "New" button (or edit an existing privilege set)
• Select "Custom privileges…" from the 'Records' pop-up menu
• Select the table name(s) that you want the user to have limited editing access
• Set the View pop-up menu to "yes"
• Select "limited…" from the Edit pop-up menu
• In the box entitled "Records can be edited when:", enter the calculation: Access = "Public"
• Click the "OK" button
• Set the Create, and Delete pop-up menus to "yes" or "no" as you want
• Set the Field Access to either "all" or "limited…" as you want (N.B: You may want to set the Access field to view only)
• Click the "OK" button
• Set the Layouts, Value Lists, and Scripts pop-up menus as you want
• Click the "OK" button to complete the Privilege Set
• Assign the privilege set to the accounts you want to control.
Hopefully, I have not skipped too many steps above but this should get you started.