6 Replies Latest reply on Apr 25, 2015 7:50 PM by Dekade

    How to exit last field in a script

    Dekade

      Title

      How to exit last field in a script

      Post

      On most of my scripts I cannot find the correct script step (or correct scripting method) to exit the last field that I was in during the script. The cursor keeps flashing within the given field box when back at the chosen layout - and having already exited from script.

      Thanks for any help,

      Dekade

        • 1. Re: How to exit last field in a script
          philmodjunk

          You'll need to describe that in more detail.

          Go to next field

          Go to field

          Go to object

          Commit Records

          can all exit the current field though all but the last do so by putting the focus somewhere else on your layout.

          If you are using a script performed by a script trigger, the event that trips the trigger may be changing where the cursor ends up as some triggers perform the script and then the user's triggering event (such as pressing tab or enter to exit the field) is processed by Filemaker unless you end your script with Exit Script [false]

          • 2. Re: How to exit last field in a script
            Dekade

            You'll need to describe that in more detail.

            Do you mean - that you need more explanation from me?  -OR- are you saying that one of your suggestions is what I need to implement into my script? I thought Commit Records would do it; or "clear field" would also do it - but they don't seem to. "Clear" field is the one that I have the most trouble with because I have positioned it as a last step in scripts before exiting to leave "filled in" fields as empty upon exiting. I don't want any field to be poised for anything upon exiting a script; just another set of blank fields ready to be filled in.

            • 3. Re: How to exit last field in a script
              philmodjunk

              Clear field specifically places and leaves the cursor in the field cleared.

              You need to describe what you are trying to do in more detail.

              You really need to post the script you are trying to work and tell us what, if any script trigger is used to perform it.

              To post a script to the forum:

                     
              1. You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
              2.      
              3. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
              4.      
              5. If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
              6.      
              7. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.
              • 4. Re: How to exit last field in a script
                Dekade

                PhilModJunk,

                I will post the script, in time, possibly. For now I placed a script step for Go to Object. That does the trick. However, I want to study script triggers more to see how and why they are used. Once I do that then I will revise (if needed) my script. Then I will see where I am at and what I want to do with the issue. I may or may not be posting again on this problem.

                Thanks for your help.

                Also, by the way, I have a post just placed on 4/23/2015 about scroll bars. That is a real issue with me. I hope there is a fix.

                • 5. Re: How to exit last field in a script
                  philmodjunk

                  You may find it helpful to read "setting up script triggers" in the Filemaker help section. It includes information on how the event that trips a script triggers is processed and includes a table that helps identify which triggers process the event, then perform the script and which perform the script and then process the event. The latter group can keep the event from being processed if the script terminates with the Exit Script [False] script step.

                  • 6. Re: How to exit last field in a script
                    Dekade

                    Thanks. I'll study that.