been there - suffered - done that.
My main tables had a first record, serial #1, Customer John Doe. The first record in the Order table, serial #1 - belongs to John Doe; and Line Items, also first record serial #1 with parent order #1, belonging to John Doe.
So, I don't think that you can lock the first record, but you can make it harmless.
a bit more ...
having a "dummy" record as the first record (where folks land when they open the db), allows a sort of "sandbox" where your users can test various buttons/scripts to see what happens without destroying real data.
Assuming none of your staff have the [Full Access] privileges, how about a script trigger (OnLayoutEntry) that says if the user's privilege set does not equal [Full Access], go to record 2.
I like that idea. It is always getting changed, even with a friendly reminder dialog box that is displayed upon opening the file.
You'd like FMP would make a calculation or something that we could set to lock a record with a specific ID number. I was reading on something about GLockID, but it was from a FMP discussion years ago.
Thanks for your input.
you could make a very angry opening dialog - but it wouldn't offend anybody because nobody reads that stuff anyway ... click and proceed.
You'd like FMP would make a calculation or something that we could set to lock a record with a specific ID number.
They did. It's called custom record access privileges.
Go to File > Manage > Security. Choose the Privilege Sets tab (advanced editor). Double-click the privilege set for which you want to restrict the editing. Under Records, choose "Custom privileges ...":
Choose the table in which the record lives. Under Edit, choose "limited...":
In the resulting dialog, set a Boolean (true or false) calculation that calculates to "true" if the record is editable. For example, if you take David's example of a serial number of 1 being protected, you might use:
SerialNo ≠ 1
From then on, nobody using that priv set can edit that specific record.
I've attached a sample file. Use Admin (no password) for Full Access; JohnDoe, password 12345 for the Staff Privilege Set. In addition, to my earlier suggestion about going to record 2 if the Privilege Set used to open the file does not equal [Full Access], the Staff Privilege Set allows viewing in the main table of records only with ID greater than 1. This keeps them from seeing the record after they go to that layout.
Hide Record One.fmp12.zip 67.7 K
Thank you for your suggestion. I'm looking all the options suggested here. I appreciate your input and suggestion!
Just tested...this is perfect for what I need to do. Quick and easy...I'm pretty sure between my friendly nag reminder dialog box and this limiting of that single record...my issues will be resolved!
Thank you very much for your help.