2 Replies Latest reply on Feb 20, 2020 2:38 PM by Ken Soszka

    Using "And" and "Or" in Track-It! 20.x Business Rule conditions

    Ken Soszka
      Share This:

      I recall reading somewhere that there is a specific methodology when using a combination of "And" and "Or" statements in the conditions of a business rule. I can't find it anywhere now. I think it was that you have to have one before the other, and that you can't go back and forth between them - meaning that all of the "And" statements would be grouped together, and all of the "Or" statements would be grouped together. I don't recall which should come first though. Thanks for any assistance!

        • 1. Re: Using "And" and "Or" in Track-It! 20.x Business Rule conditions
          Cris Coffey

          Hey Ken, when you mix AND and OR statements, you just have to be very careful because there are no parenthesis options so the OR actually acts like the separator.

           

          For example, if you wanted to filter for Tickets that are Open AND Assigned to Tom OR Mary and you built your filter like the first example below, you would get all of Toms open tickets because those two pieces are connected with the AND but the view will also then include any tickets assigned to Mary, whether they are open or closed because there is no filter on Status on Mary's side of the OR. So this example would not give you what you want.

           

          STATUS = OPEN

          AND

          TECHNICIAN ASSIGNED = TOM

          OR

          TECHNICIAN ASSIGNED = MARY

           

          To filter on only Open tickets for Tom or Mary, we would simply add another status condition on Mary's side of the OR, like this:

           

          STATUS = OPEN

          AND

          TECHNICIAN ASSIGNED = TOM

          OR

          STATUS = OPEN

          AND

          TECHNICIAN ASSIGNED = MARY

          1 of 1 people found this helpful
          • 2. Re: Using "And" and "Or" in Track-It! 20.x Business Rule conditions
            Ken Soszka

            Thanks Cris! That makes total sense now that I see it in your examples. Exactly what I needed, much appreciated.