How can i make a record unmodifyable once it is committed. Then how can i allow only adminstrator to be able to modify the record thru security or other way.
vijaybhanabhai wrote: How can i make a record unmodifyable once it is committed. Then how can i allow only adminstrator to be able to modify the record thru security or other way.
There are a number of ways to go about locking records, but one of the most robust is to use the Record Level Access (RLA) controls in FileMaker's built-in security.
Assuming you're using FileMaker 10 or later, if you:
Then once records are first committed they will be unavailable for editing except by a user who is logged in with a [Full Access] account.
FWIW, I am attaching a simple one-table demo file that shows this in operation.
R J Cologon, Ph.D.
FileMaker Certified Developer
Author, FileMaker Pro 10 Bible
NightWing Enterprises, Melbourne, Australia
vijaybhanabhai, be careful what you ask for.
Locking the record immediately after commit menas that the users cannot correct typos, and they cannot part-enter a record if some data is missing.
I inherited a solution that implemented a similar record locking scheme, and spent several weeks progressively removing it because users found it impossible to work with.
If your intention is to prevent accidental record modification, implement a scheme where the record needs to be unlocked by the user before changes can be made. The step of explicitly unlocking the record ensures that unintended changes are prevented, but users are still able to change the record when they need to themselves.
Vaughan wrote:vijaybhanabhai, be careful what you ask for.
Agreed - though the same could be said of quite a few of the questions asked on forums such as this... ;)
A lock override or a clear (and not to onerous) mechanism for dealing with exceptions is a good idea in most situations where a data lock is in place.
And this method has to be "locked down", so that the "unlock" method is not able to be done without many keys to open the door!
I also like to log the record before "unlock" and after changes, regardless of who has the keys.
Yes, edits often do not occur to the user immediately, and it makes them feel helpless and maybe even hateful when they can't fix their submissions. I like to give the record 12 -24 hours to edit, if the business rules allow. If you choose to do this, you could have your lock field be a calculation based on creation date or a time calc. You can also limit access to only the creator of the record for a set amount of time, so only the creator can edit it in the window allowed. Just some ideas. If a day ends on a record, most of the little stuff tends to have been dealt with.
LauraZ. wrote:...if the business rules allow...
...if the business rules allow...
That, right there, is the key. The process must support - and should align with - business rules and (in some cases) legal requirements.
I'd agree that creating a process that's more restrictive or onerous than the business or statutory requirements would be self-defeating. However, I don't believe we have any information to indicate whether or not that may apply in vijaybhanabhai's case.
How can we lock all the fields in a record after commit but leave one field in the layout to be modifyable by all users via script only. ( not modifyable via layout entry)
Lock all the fields. Have the script run with full user access permissions by checking the box at the bottom of the script dialog box.
Retrieving data ...