1 Reply Latest reply on Sep 30, 2013 9:38 AM by philmodjunk

    Script to change field to browse

    RicHarding

      Title

      Script to change field to browse

      Post

           Hi guys,

            

           Is there a way to have a button run a script to set a field to browse mode?

            

           i.e. Click a button and the 'first name' filed becomes available for data entry (assuming it is already not enabled for browse mode)?

            

           I want to lock fields in case of accidental modification so users have to click a modify button to allow changes.

           Thanks

        • 1. Re: Script to change field to browse
          philmodjunk

               Your entire window and the entire layout currently shown is in a particular window mode such as Browse, Find, Preview or Layout. You cannot set a specific field on a layout to Browse mode.

               There are several approaches for what you want to do. In one of my systems, if you modify a field, a dialog pops up when you exit the field asking you if you want to save the changes or revert to the previous value. That protects the fields against accidental changes.

               You can set a validation calculation in field options that rejects all changes to the field unless a particular value is set in a field or variable. Your button can then set that value to permit a change.

               You can also use OnObjectEnter to reject entry to a field unless a particular variable or field value is set, and this might be sufficient to guard against accidents, but be aware that drag and drop can be performed on such a field without tripping this script trigger.