3 Replies Latest reply on Feb 12, 2013 11:45 AM by philmodjunk

    changing "Field Entry" in a script



      changing "Field Entry" in a script


           Yes, I know the brute force way to solve this is with a custom dialog but....

           I have a couple of fields that I have the "Field Entry" options all unchecked (uneditable) by default.  Based on the value of another field, I would like to set the "Field Entry" Browse value to checked so that data can be entered.

           Is there a way to do this?





        • 1. Re: changing "Field Entry" in a script

               The field entry options can not be changed from a script.

               But there are any number of ways to dynamically control access to a field.

               Manage | Security can reference a "lock expression" for an entire table. If these fields are part of a separate table--perhaps linked in a one to one relationshp to the rest of the data, a script can change a value in a field to control whether the lock expression permits modifying data in these fields.

               Script triggers such as OnObjectEnter and OnObjectModify can be used to control access to a field.

               Validation rules can also use a "lock expression" to reject all changes to a given field if it is "locked" by setting a value in an associated field. This option permits users to attempt a change, but then forces them to revert the record when they do. That's not the most user friendly approach, but it will control access to that field on every layout in your database so it's often useful in combination with layout based access control methods as "insurance" against accidentally leaving a "loop hole" in your interface design that permits users to access the field when you don't.

               You can also put two copies of your field on the layout, one with access denied and one that permits access. If you put them on different panels of a transparent tab control, a script can control which panel is in front and thus whether or not access to the field is permitted.

          • 2. Re: changing "Field Entry" in a script

                 Thanks for reply,

                 I like the last option best with the tab control.  that matches closer to the visable/enabled properties from Delphi which I am more used to.

                 thanks again,