5 Replies Latest reply on Mar 17, 2017 9:19 PM by GH_1

    Error Capture not working

    GH_1

      I have Error Capture on, but it is not catching the Error.

       

      I  click on a value to put into Find that must bring "zero" in search results, but it does not make the Custom Dialogue window pop up.

       

      The script is below:

      Screenshot Mar 14 21.23.01.png

       

      Any thoughts?

        • 1. Re: Error Capture not working
          GH_1

          I figured it out.

           

          If you click on a value that is EMPTY (no field contents whatever), then it will not function with Error Capture.

           

          There needs to be some value that is "tested" in Find Mode, and only then will Error Capture work.

           

          So .....

           

          Instead, I set up a Script Step that uses "IsEmpty" first. If the field is empty, then it display a Custom Dialogue as an "If".

           

          It now works.

           

          The problem was trying to Search/Find when copying an Empty Field.

          • 2. Re: Error Capture not working
            GH_1

            Here is a snapshot of the Script that solves the problem:

             

            Screenshot Mar 14 21.34.30.png

            • 3. Re: Error Capture not working
              RickWhitelaw

              I see no need for the Commit step.

              • 4. Re: Error Capture not working
                BruceRobertson

                Could be improved. There are several problems with using the clipboard, for one thing.

                Consider the following mods.

                Note that it is not necessary to show all records before performing a find.

                But why do you have tables Factures and Factures 2?

                 

                If [ isEmpty( Factures 2::facture tracking no )]

                Show Custom Dialog [ "No search results."]

                Exit Script

                End If

                Set Variable [ $trackingNumber; Factures 2::facture Tracking No ]

                Close Window [ Name: "Factures"; current file]

                New Window ( etc etc)

                Go to Layout [ "Factures - All - (concise)" (Factures)]

                Enter Find Mode [ Pause : Off ]

                Set Field [ Factures::facture tracking no; $trackingNumber ]

                Perform Find [ ]

                • 5. Re: Error Capture not working
                  GH_1

                  Thanks so much, Bruce

                   

                  I didn't know you do not need to show all records before a Find.

                   

                  And I will use Set Variable instead of clipboard paste from now on.

                   

                  Thanks again.  Cheers.