5 Replies Latest reply on Feb 22, 2010 9:23 AM by shudder

    Really strange script issue

    LeoB

      Title

      Really strange script issue

      Post

      In a file I have the following script set to trigger on field modify for Issue::Status to reset certain related fields and to take the user to the next field that should be entered.  I have used this same script in another file for the exact same purpose (and field names), and it works fine.

       

      In this file, however, the first half of the script works perfectly.  However, the second half of the script takes the user to the next field in the layout -- whatever that field is.

       

      If [ Issue::Status = "Open" ]
      Set Field [ Issue::DateClosed; "" ]
      Set Field [ Issue::ApprovedBy; "" ]
      Set Field [ Issue::ApprovalDate; "" ]
      Commit Records/Requests [ No dialog ]
      Beep
      Show Custom Dialog [ Title: "Suspense Date Recommended"; Message: "A Suspense Date is recommended after changing the status from Closed to Open"; Buttons: “OK” ]
      Go to Field [ Issue::SuspenseDate ]

      Else If [ Issue::Status = "Closed" ]

      Set Field [ Issue::ApprovedBy; "" ]
      Set Field [ Issue::ApprovalDate; "" ]
      Set Field [ Issue::SuspenseDate; "" ]
      Commit Records/Requests [ No dialog ]
      Beep
      Show Custom Dialog [ Title: "Closed Date Required"; Message: "A Closed Date is required"; Buttons: “OK” ]
      Go to Field [ Issue::DateClosed ]

      End If

       

      Some things I've done:

       

      • Removed all other scripts from all of the fields involved in this script -- no change.
      • Since I imported this script from another file, I deleted the imported script and reconstructed it -- no change.
      • Removed all trigger scripts from the layout setup -- no change.
      • Removed all tab orders from the script -- no change.
      • Relocated fields in the layout -- it still goes to the next field in the layout, whatever it is.
      • Created a new layout with just these fields and set the script -- same thing.
      • Moved the script to on field exit -- same thing.


      Anybody got any other ideas to try?

       

      Thanks

       







        • 1. Re: Really strange script issue
          philmodjunk
            

          If you were using onObjectExit, I'd be recommending Exit Script [False].

           

          Have you tested this on a completely new layout? (Don't copy and paste from your current layout for this test.)

          • 2. Re: Really strange script issue
            LeoB
              

            Yes, I did a complete new layout and tried it there -- that was one of the steps I tried (mentioned in the original post).  Same thing.

             

            I had tried it OnObjectExit, with no change.  In the other file I have it working fine on OnObjectModify.

             

            Where does the Exit Script [False] go in the script?  After EndIf?

             

            Thanks

             

             

            • 3. Re: Really strange script issue
              shudder
                

              I built all of your various fields and your script into a table I had lying around... and it works fine.  I could not break it.  I even changed the various date fields to Text to see if that mattered at all.  It did not.

               

              Maybe try a Recover on your file that is giving you the problem?...

               

              - Michael

              • 4. Re: Really strange script issue
                LeoB
                  

                Michael:

                 

                Forgot to mention, I had tried a Recover earlier, with no change.

                 

                So, what I just did was to remove all the fields from the layout (which is one I had been working all day long to get right) and then reinserted them one by one.  Whatever was causing the conflict is now gone -- it works fine.  Yeesh.

                 

                Your VW bus reminds me of the 1963 Transporter with all of 36 HP that I used to drive many years ago.  I called it a Model 2060, 20 MPH up the hill and 60 miles an hour down.  Average of 50 engine-hours between something breaking.

                 

                Thanks.

                 

                 

                • 5. Re: Really strange script issue
                  shudder
                    

                  >> Whatever was causing the conflict is now gone -- it works fine.  Yeesh.

                   

                  Yeesh, indeed.  I hate problems like that.  No logic to it.  *_*  Something just 'broke' and we do not know why...  Ugh.

                   

                  In any case, glad it worked itself out for you.  That's better than the alternative, I guess.  

                   

                  Glad the Bus reminded you of something good (or maybe not so good?...).

                   

                  - Michael