1 Reply Latest reply on May 24, 2011 9:22 AM by philmodjunk

    locking some fields



      locking some fields


      Hello guys,

      I am facing some problem.

      Here i am elaborating it.

      I am importing some records from table X to table Y and after importing script step, i am setting all the records that are imported have flag 1.

      my requirment is how i lock all the fields corresponding one record that have flag value 1.

      Is it possible by condition formating?

      Or any other way of solution is also welcome........



        • 1. Re: locking some fields

          Conditional Formatting only changes how data is displayed not whether it can be edited.

          I can't tell from your post whether you are locking all the fields in records flagged with 1 or just certain fields within that flagged record.

          To lock the entire record, you can use Manage | Security to control record access on a record by record basis.

          See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a detailed description of how to set this up.

          If you only want to lock certain fields defined in the record, you can still use the above method if you want. You can split your existing record's field definitions between two tables linked by serial Id in a 1 to 1 relationship. Put all your fields that you want to lock in one table and all the others in the second. Your current layouts can still work for you, you would just need to re-point the fields on the layout to the correct table.

          Other options work, but require script triggers and/or extra layouts where you deny access. Those methods are much less secure and require care to make sure you don't leave any "loop holes" that let an undesired change take place, but can be done:

          1) OnObjectEnter script triggers can perform a script that checks the flag and uses go to field and/or go to object to move the cursor back out of the field if the lock flag is set.

          2) OnLayoutEnter and/or OnRecordLoad script triggers can check the flag and change to a layout identical to your current layout, but with behavior settings that deny access to the locked fields when you are in browse mode.