4 Replies Latest reply on Jan 6, 2017 10:55 PM by embeco

    Before typing, press TAB or Click... Error

    embeco

      I have a field on a screen associated with a value list from a field. The screen field has a script trigger with an OnRecordLoad performing the script "Update Value List" (see attached). If my user enters a "~" in the field the script will present an "Update Value List" screen allowing the user to edit the entries in the associated value list.

      The "Update Value List" layout behavior is "Browse." Should I have anything else indicated?

      As soon as the script finishes its last instruction, I get the dreaded "Before typing, press TAB or click..." message box as my layout appears on the screen with the cursor blinking in the only field in the layout at the end of the entries.

      Try as I might, I can't get rid of this message box. At least can anyone tell me how to "press TAB" with a script?

      I have tried the "tip" script described in previous entries related to this error without success.

      Thanks

        • 1. Re: Before typing, press TAB or Click... Error
          philmodjunk

          Your description of your set up leave me confused.

           

          OnRecordLoad is a script trigger set on the LAYOUT not an individual field. Entering a ~ or any other value will not trip this script trigger.

           

          You cannot set "browse" as a layout behavior. You can have the window in Browse mode--has to be if you want a user to be able to edit data and you can specify "Browse" as part of the behavior settings for a given FIELD.

           

          So there is some real confusion of script triggers and names here.

           

          As a bit of a guess, it sounds like you have actually set up something like the OnObjectKeystroke trigger to process your ~ (There are better options that are less cryptic for adding what I call an "action value" to a field based value list, BTW.)

           

          After performing the script specified for the trigger, the keystroke that tripped the trigger is then processed, but if your script has changed focus so that no field has a focus, I think you'll get the error described. You'd need to either return focus to the original field or use Exit Script [False] as the final step in your script to cancel out the event that tripped the trigger in the first place.

           

          If my guess is accurate, I would not use this trigger, I'd use something like OnObjectModify (pop up menus) or OnObjectSave (Drop down lists where you can type data into the field) instead of testing keystroke by keystroke.

          • 2. Re: Before typing, press TAB or Click... Error
            embeco

            You are certainly correct: The field script trigger is OnObjectKeystroke and

            your "Exit Script " did the trick as the last command in the script.

             

             

             

            Sorry for the confusion.

             

             

             

            The point of this whole process is to allow the user to edit a drop down

            value list from field.

             

             

             

            I couldn't get OnObjectSave to work with my drop down value list from field.

            I could type over existing entries but when I went to the next field and

            came back to the original field the value list had not changed (and I really

            didn't expect it to). I'll look into OnObjectSave but for right now it works

            and I'll stick with that.

             

             

             

            I could avoid all of this if FileMaker would let me click the "Allow Editing

            of Value List" for a value list from field. Christmas is only 360 days away.

             

             

             

            Thanks for your help - you saved me another four hours of frustration. I'll

            mark this one as "Answered" although I only seem to have the option of

            "Presumed Answered." Am I the only one that thinks they could use some work

            on the community interface?

            • 3. Re: Before typing, press TAB or Click... Error
              philmodjunk

              In order to mark a discussion as "answered" it needs to be set up as a question to begin with. Then I suspect that you need to open the forum in a full up Browser and not try to do this from a smart phone...

               

              I couldn't get OnObjectSave to work with my drop down value list from field.

              I could type over existing entries but when I went to the next field and

              came back to the original field the value list had not changed

              That really doesn't make any sense. If you change data in a field, it will stay changed unless something you are the script does specifically reverts the record or otherwise changes the value of the field.

              • 4. Re: Before typing, press TAB or Click... Error
                embeco

                I was just typing in the drop-down instead of the field. This would work

                fine but there are instances where my user would put something in this field

                that she does not run into very much and therefore not worth adding it to

                her drop-down list. With OnObjectSave she would get the pop up screen to

                change the drop down every time she entered anything in this field.

                 

                 

                 

                I really appreciate your help with all of this.