1 2 Previous Next 22 Replies Latest reply on Jun 22, 2009 2:14 PM by RexH

    Goes to wrong field

    RexH

      Summary

      Goes to wrong field

      Description of the issue

      I have FMP 10 on my desk top and running on Server 9. some of the scripts have started going to the wrong field while running a script. These are scripts that have worked in the pass for some months now. Is there some kind of conflict between 10 and Server 9??

        • 1. Re: Goes to wrong field
          philmodjunk
            

          I suggest describing your situation in much more detail. If you have a copy of FMP adv, try running the script with the debugger and report back what you find.

           

          If you are absolutely certain that you have made no changes to scripts, layouts or field definitions that might explain this, you might test a recovered copy of the file and see if that fixes anything.

          • 2. Re: Goes to wrong field
            RexH
              

            The script says

            Else
            Insert Text [" Date put in was"]
            Insert Calculated Result [ Systems2 Converted::NEW est sys ship date]
            Insert Text ["
            " ]
            Insert Current Date []
            Insert Text [" "]
            Insert Current Time []
            Insert Text [" "]
            Insert Current User Name []
            Go to Field [ Systems2 Conyerted::NEW est sys ship date]********instead of goin to this field it goes to another ran with debugger goes to different field.
            Select All
            Exit Script []





            • 3. Re: Goes to wrong field
              philmodjunk
                

              Is "Systems2 Conyerted::NEW est sys ship date" on the current layout?

               

              Go to field fails silently (Script is not interrupted, no error message is displayed) if the specified field isn't on the current layout.

               

               

               

               

              • 4. Re: Goes to wrong field
                RexH
                   Yes it is actually I click on that field to start the script.
                • 5. Re: Goes to wrong field
                  philmodjunk
                     Since there don't seem to be any matching trouble reports, (I've converted my files from version 5.5 and don't have any trouble like this), I'd test a recovered copy of the file and see if that fixes the problem.
                  • 6. Re: Goes to wrong field
                    RexH
                       Recovered the file but it didnot fix the problem. It is get so that almost every script with go to field is going to the wrong field.
                    • 7. Re: Goes to wrong field
                      mrvodka
                         Do you happen to have some kind of Script trigger on this layout or object?
                      • 8. Re: Goes to wrong field
                        RexH
                           I have 2 trigger scripts on layout but not on that object
                        • 9. Re: Goes to wrong field
                          mrvodka
                             Could you zip a clone copy of the file and send it to me offline in order to see if I can replicate your bug on my machine?
                          • 10. Re: Goes to wrong field
                            RexH
                               I'm affraid not this is a company file and there is proprietary info on it. this problem is happening on everyone's computer even if you open without the server.
                            • 11. Re: Goes to wrong field
                              mrvodka
                                 Ok then. What are your script triggers and their corresponding scripts?
                              • 12. Re: Goes to wrong field
                                RexH
                                  


                                Set Error Capture [ On ]
                                Go to Field [ Systems2 Converted::jobnumber find]
                                Copy[ ]
                                [Select]
                                Enter Find Mode [ ]
                                Go to Field [Systems2 Converted::JobNumber]
                                Insert Text [ "*,, ]
                                [Select]
                                Paste [ ]
                                Insert Text ["*" ]
                                Perform Find [ ]
                                If [ Get ( FoundCount )=0 ]
                                Show Custom Dialog [Message: "There are no projects with this string of characters in the Job Number."; Buttons: "OK", "Cancel" ] Go to Field [ Systems2 Converted::jobnumber find] Clear [ ]
                                [Select]
                                Perform Script [ "project detail" ]
                                End If
                                Go to Field [ Systems2 Converted::jobnumber find]










                                • 13. Re: Goes to wrong field
                                  philmodjunk
                                    

                                  Here's some good news: With the more recent versions of FMP, you can rewrite this script to get rid of almost all the go to field, copy, paste, insert steps:

                                   

                                  Set Error Capture [ On ]
                                  Set Variable [$Job, Systems2 Converted::jobnumber find]
                                  Enter Find Mode [ ]
                                  Set Field [Systems2 Converted::JobNumber, "*" & $Job & "*"]
                                  Perform Find [ ]
                                  If [ Get ( FoundCount )=0 ]
                                     Show Custom Dialog [Message: "There are no projects with this string of characters in the Job Number."; Buttons: "OK", "Cancel" ]

                                      Set Field [ Systems2 Converted::jobnumber find, ""]
                                      Perform Script [ "project detail" ]
                                  End If
                                  Go to Field [ Systems2 Converted::jobnumber find]

                                   

                                  Note: For some reason, your script presents a custom  dialog with two button options, (OK, Cancel), but doesn't attempt to detect which button was clicked. Perhaps you've condensed this script a bit from its original.

                                   

                                  I know this doesn't explain why go to field isn't working. Like Mr. Vodka, I'd look at any script triggers you have as they may be affecting the function of your script in unexpected ways.

                                   

                                  If you had a copy of FMP 10 advanced, I'd suggest using the script debugger to step through this script to see what's going wrong.




                                  • 14. Re: Goes to wrong field
                                    RexH
                                       used the script debugger and when it gets to the goto it goes to adifferent field. it does this in 2 different files that are not related. go figure. will try out that script thanks for the info.
                                    1 2 Previous Next