2 Replies Latest reply on Apr 19, 2011 4:22 AM by leonhart1981

    Question about Find!!!!?

    leonhart1981

      Title

      Question about Find!!!!?

      Post

      How to find records that contains check boxes with OR function?

      For example, say I have 2 fields (field#1 & filed#2) that are check boxes

      Field#1

      A / B / C / D

      Filed#2

      E / F / G / H

      And I want to find records that when either A & B or E & F are checked!

      In this case, what should I do?

        • 1. Re: Question about Find!!!!?
          LaRetta_1

          Use two different find requests when wanting an OR on the same field, such as if via script. 

          Enter Find Mode [ uncheck pause ]
          Set Field [ checkboxfield ; "A B"
          New Record/Request
          Set Field [ checkboxfield ; "E F"
          Set Error Capture [ On ]
          Perform Find [ ]
          If [ not Get ( LastError )  // no errors found ]
          Show Custom Dialog [ "No records found" ]
          Halt Script
          End If
          ... do whatever you wish with your found records

          Note that, in the script, records will be found even if their order in the checkbox doesn't match your script, so A¶B would be found and so would B¶A.  Note also that you don't need to specify carriage return between your entries; all are treated as individual words.

          • 2. Re: Question about Find!!!!?
            leonhart1981

            Ok~ thank you very much!

            I will give it a try!!