3 Replies Latest reply on Feb 4, 2011 1:57 PM by philmodjunk

    disabling/enabling field entry in layouts

    med

      Title

      disabling/enabling field entry in layouts

      Post

      I am designing a layout to post payments and I read a parameter from a different table to indicate whether a receipt number can be entered or is assigned automatically. So I need to make the receipt number field accept entry or not depending on the case.

      I can make two different layouts but it seems to be very inefficient programming to have have two different layouts for the sake of one field out of 20. This requirement will also be needed in other layouts but for more than one field. For example: receipt number as mentioned above as well as tax entry which depends on a different parameter.

      Is there a smart way to achieve this.

        • 1. Re: disabling/enabling field entry in layouts
          philmodjunk

          If this field has an edit box format, you can use the OnObjectEnter script trigger to run a script that determines whether the field may or may not be entered.

          • 2. Re: disabling/enabling field entry in layouts
            med

            Thank you .... but this onobjectenter trigger does not work on IWP and I do not know if it works for FMGO. So I will implement the idea for the full FM terminals but is there another way to achieve the same for those who are using IWP or FMGO ? 

            • 3. Re: disabling/enabling field entry in layouts
              philmodjunk

              I believe triggers work in GO, from what I've read. They don't work in response to user actions in IWP. If I had known that detail, I would have suggested a more cumbersome, approach that works without triggers. This method works if the field is set up as a drop down or pop up I'm not completely sure it will work in IWP, you'll have to try it and see. (Otherwise, I think you're stuck with maintaining two layouts.)

              Take this field out of the tab order so that it cannot be entered by pressing Tab, enter or Return. Place a transparent button over the top of the field. Now set up this button to run the script I suggested previously.