Developer forum

Forum » Dynamicweb 10 » Nesting groups of expressions in a query

Nesting groups of expressions in a query

Sigurd Nejrup
Reply

In DW9, it was possible to nest groups inside each other when creating a query, but that does not seem to be the case for DW10, unless I am missing something?

What I'm trying to do is retrieve all products that:

1. Is in the Bought with products array

OR

2. Is in the same category/group as what is set in the parameter

It works fine, but I want to exclude the product ID (PID) from the second group - which I reckon would have been possible with a nested negate group using "Bought with products" again.

Now that this isn't possible in DW10, is there another way of achieving this?


Replies

 
Igor Ivanov Dynamicweb Employee
Igor Ivanov
Reply

Hi Sigurd,

I can confirm that I also do not see the possibility of nesting the groups

If you run into a scenario where you can not achieve the disered result in configuration you can create a macro 

https://doc.dynamicweb.com/apix/api/Dynamicweb.Extensibility.Macros.Macro.html

The Macro is a very powerful tool, but you need to excercise caution when using it to avoid performance issues

You can use the macro to return a list of product id's that match your criteria and use that value in the query

 

 

You must be logged in to post in the forum