5 Replies Latest reply on Jun 15, 2016 1:23 PM by Razor

    Having Trouble with an OR Find

    Razor

      I'm using FMA15 and having more problems than I should be having with an OR find.

       

      I have the following script;

      Screen Shot 2016-06-15 at 2.46.41 PM.png

      I'm expecting this to return a list of records that have not been marked either completed or deleted.

       

      If I run the script with just one of the Set Fields I get the results I expect.  However the  script as shown above is running as an AND find.

       

      What am I doing wrong?

        • 1. Re: Having Trouble with an OR Find
          karina

          Hi,

           

          You can use this in your script:

           

          Set Error Capture [ On ]

          Enter Find Mode [ ]
          Set Field [ PROJECTSITE::DeleteUsername "=" ]

          Perform Find [ ]
          Enter Find Mode [ ]
          Set Field [ PROJECTSITE::CompleteUsername; "" ] Extend Found Set [ ]

           

           

           

          • 2. Re: Having Trouble with an OR Find
            siplus

            The show all records at start is useless and overkill.

            1 of 1 people found this helpful
            • 3. Re: Having Trouble with an OR Find
              karina

              Hi,

               

              You can use this in your script:

               

              Set Error Capture [ On ]

              Enter Find Mode [ ]
              Set Field [ PROJECTSITE::DeleteUsername "=" ]

              Perform Find [ ]
              Enter Find Mode [ ]
              Set Field [ PROJECTSITE::CompleteUsername; "" ]

              Extend Found Set [ ]

               

              I forgot to mention this, in your script you set the field DeleteUsername to "=" and the new request is only the extra field you set.

               

               

              • 4. Re: Having Trouble with an OR Find
                Razor

                Thanks Karina, but if I'm understanding what you suggested correctly, this would be an AND search right? 

                1. Find me all records that do not have a user name in the deleted field.

                2. Find me records in the first found set that do not have a name in the completed field.

                I tried your suggestion and that appears to be whats happening.

                Screen Shot 2016-06-15 at 4.10.06 PM.png

                I need all records that do not have a name in the deleted or completed field.  That's why I went with my original code.

                 

                BTW, thanks siplus, I always add that in there just to make sure I don't get some weird result.   Nice to know its not needed.

                • 5. Re: Having Trouble with an OR Find
                  Razor

                  That did it!  Thanks!

                   

                  I thought I had to perform the empty deletes find, then perform a find on those records for the empty completes.

                   

                  This works;

                  Screen Shot 2016-06-15 at 4.23.00 PM.png

                  I feel like a fool, lol.