3 Replies Latest reply on Apr 16, 2012 7:32 PM by DavidJondreau

    Locking Records as opposed to fields?


      FMP12 Advanced


      I have a Member and Event database based don the Event Management starter solution from FMP11 and I want to make sure that past events can't be modified but I want to be sure that new events/records can be created. How is this possible?


      Thanks for any help.



        • 1. Re: Locking Records as opposed to fields?

          I guess the only way would be permissions.

          • 2. Re: Locking Records as opposed to fields?

            If you have a priviledge set already setup, edit the set and change the Records to Custom priviledges.


            For the Events table, set Edit to limited.


            From there you can specify a calculation as to which events are editable. For example, if you have some type of field that marks the event as passed, you could setup a calc of EventStatus (doesnt equal) "past" or something along those lines.


            This would still give you the ability to edit current events and create new ones and make past events un-editable.

            1 of 1 people found this helpful
            • 3. Re: Locking Records as opposed to fields?

              There's several different ways to do this. Do you want to prevent users from never ever ever changing past records (the record can't be edited at all, not just portions of it) and that is very high priority? Or is it just most of the time they shouldn't be able to change those records, or a portion of the record (event details, but not payment details) or it's important but not a legal requirement? Privilege sets are the best way to go if it's a strict requirement. But there are other ways that give more flexibility.


              As Matt mentioned, you do need to define what "past" means. Is it just past since you moved the data into the database, or past the event is over, or the event ended two weeks ago, etc?


              You could use script triggers for instance, on each field to test whether the user can enter the field or not. Or you could use an onRecordLoad trigger that switches to a tab with fields that allow entry (or not). You could load globals with the real record data...there's lots of options depending on your skill level and solution needs. Personally, I favor the onObjectEnter script trigger.

              1 of 1 people found this helpful