jquery-query-builder

Querybuilder.js Adding both AND and OR statements


Using querybuilder.js example (https://querybuilder.js.org/) I do not see a way to have both AND and OR statement. For example, If I wanted to build a query that includes:

(Name = "Name 1" AND Name = "Name 2") OR (Price = 1.00)

I don't see a way to add this. I can make it all "AND" or all "OR". If I add the first two AND fields, then add a single GROUP, I still cannot denote that GROUP as "OR", as the AND/OR button for that group is disabled. Is there a way to override this functionality? OR, is there another way to hand this case?


Solution

  • enter image description here Please find the setup below for your answer. This case is very basic and should be supported by any query buider.