We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22673
    • 72 Posts
    Just a simple question about how to write parameter properly:

    I have a Ditto call which I would like to filter using two TVs:

    &filter=`TVmissed-it,No,7`


    and

    &filter=`TVmonth,January,7`


    But how do I get the Ditto call to filter both?

    I have tried:

    [[Ditto? &tpl=`tplEvents` &orderBy=`longtitle ASC` &filter=`TVmissed-it,No,7|TVmonth,January,7`]]


    But it says "no documents found".

    Any help much appreciated.

    Alex.
      • 22448
      • 241 Posts
      Hi Alex,

      the question is marked Solved but there’s no solution described. How did you add multiple filters with the "AND" relationship?

      Thanks.
        • 22673
        • 72 Posts
        Sorry I can’t remember and the site I was working on doesn’t exist anymore. Here is some info on filtering: http://ditto.modxcms.com/tutorials/basic_filtering.html
          • 22448
          • 241 Posts
          Thanks i already found that page.

          Apparently Ditto treats multiple filters with the OR relationship, and there’s no way to change it to AND. So the only way to get filtering equivalent to AND is to play with the comparison relationships to try to get the needed logical result only using the OR relationships.

          so instead of saying "filter records not egual to Yes" say "filter records equal to No" and vice versa.
            • 26931
            • 2,314 Posts
            Apparently Ditto treats multiple filters with the OR relationship, and there’s no way to change it to AND. So the only way to get filtering equivalent to AND is to play with the comparison relationships to try to get the needed logical result only using the OR relationships.
            so instead of saying "filter records not egual to Yes" say "filter records equal to No" and vice versa.
            related: http://setpro.pl/software/ditto-stuff/obtaining-by-or