2019-03-08, 07:34
You can combine and + or via JSON so I guess that's also possible for xsp paths. But to remove the duplicates you have to cleanup that list afterwards. Via Python it's easy.
FYI: Untested combination of "and" + "or" in xsp
videodb://movies/titles/?xsp={"rules":{"and":[{"or":[{"operator":"is","field":"genre","value":["Action"]},{"operator":"is","field":"genre",["Adventure"]}]},{"operator":"isnot","field":"title","value":"Alien"}]},"type":"movies"}
edit2: doesn't work for xsp
Edit:
Why don't you use this? This doesn't return any duplicate.
Edit3:
What exactly do you want to achieve? A "similar movies" widget based on a listitem?
FYI: Untested combination of "and" + "or" in xsp
videodb://movies/titles/?xsp={"rules":{"and":[{"or":[{"operator":"is","field":"genre","value":["Action"]},{"operator":"is","field":"genre",["Adventure"]}]},{"operator":"isnot","field":"title","value":"Alien"}]},"type":"movies"}
edit2: doesn't work for xsp
Edit:
Why don't you use this? This doesn't return any duplicate.
Code:
videodb://movies/titles/?xsp={"rules":{"or":[{"field":"genre","operator":"is","value":["Action"]},{"field":"genre","operator":"is","value":["Thriller"]}]},"type":"movies"}
Edit3:
What exactly do you want to achieve? A "similar movies" widget based on a listitem?