I revisited the idea of record locking based on a records status. For example is a record was closed, my clients wanted to preserve the data.
So At first glance I reviewed the options I knew. Duplicate the layout. Set a trigger in entry that switched the layout to a non editable copy.
Although it is an effective. Often new fields are added and remembering to update each layout seems like a lot of extra unneeded work.
My next idea, name each object on the layout by the the layout name. Call a script trigger that evaluates the records, if the conditions pass. It goes to the object name. This works great on standard field, but not very well on popup and drop down menus. Which requires the developer to capture the data first then set databank if conditions fail.
Frustrated. I searched the internet looking for best practices. I did find an article from FileMaker about modifying at a security level. This can be done on each field. Which is also a lot of maintenance. So keeping this idea in mind. I created a script that triggered the record on load evaluated the status and relogged the user in with read only access. Although the idea is a good one I found two thing wrong that prevented the idea from being usable. First, even though the record was locked the fields were open and allowed you to click into the data. Once you made the attempt to modify. A cryptic security message popped up. I did not like the fact that the fields appear open and I also wanted to modify the message to give the user a better understanding of why they were getting the message. I was unable to address either issue.
My next approach was an idea based on other techniques I had found on the internet that I felt were out dated. I created a clear button over the object I wanted to lock. I added object hiding to the button, so that if the conditions were met it would appear. The button simply showed a dialog that the record was locked and committed. when the condition of the records was not locked the button simply was not there.
I feel that the idea was a good start but was a stupid FileMaker hack to a lord existing problem. My clients are alway complaining that users think that they are in find mode and accidentally modify the first record in the database. I have seen other solutions where developer has a slide panel and a edit button to prevent this. But what if you have multi relationship, tabs, sliders and pop menus and you need to control the data from being changed.
After with speaking with a couple other developer we feel it would be an excellent feature if FileMaker offered "disallow edit when". The idea just like conditional or object hiding would allow the developer to create conditions on a field that turns off the ability to enter into the field then the record conditions are locked.
Please consider this request.
Dynamic Business Solutions