We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37108
    • 80 Posts
    When one has a tv saving multiple values in a delimited fashion (e.g., from checkboxes or multiple selects), it appears to be difficult to filter on it (with tvFilters).

    For example let's say "exampleTV" for a given document has the value "1||4||10" and you want to filter by way of "tvFilters=`exampleTV==1`". It would be great to have an operation that's a sort of "IN" in reverse: "tvFilters=`exampleTV*=1" where the *= (contains) operator would cause the tv value to be exploded by its delimiter and check if the desired value is IN the resulting array.

    Though I've seen solutions using wildcard(s) mentioned, they seem unreliable for handling the problem in all situations. Does the above suggestion make sense or is there an easier or already-existing way to handle this?
      • 4172
      • 5,888 Posts
      if you would have the values stored like that:
      ||1||4||10||

      it should work with
      &tvFilters=`exampleTV==1`


      it's also possible to use the sql-function CONCAT in the where-clause to add the pipes before and after the TV-value.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!