1 Reply Latest reply on Sep 17, 2014 6:36 AM by philmodjunk

    Combining If found script steps

    john9210

      Title

      Combining If found script steps

      Post

      Fm 12: want to suppress an error message after a find and I want to take certain actions depending on the number of records found. Can the following steps be written as one script step?

      If found count = 0, halt script

      If found count = 1, halt script

      If found count = 2, continue and perform steps a, b and c

      If found count = 3, continue and perform steps x, y and z

        • 1. Re: Combining If found script steps
          philmodjunk

          It cannot be done in one script step, but it can be done

          Set Error Capture [on] ---> suppresses the error dialog that no records are found
          If [ Get (FoundCount) < 2 ]
             Halt Script
          Else IF [ Get ( FoundCount ) = 2 ]
             a, b, c
          Else  If [ Get ( FoundCount ) = 3 ]
              x, y, z
          End If