Posted on 12/06/2020 11:06:01
Hi Siv
You also have an expression saying "variant = False" meaning you only query master products that does not have this information.
So you would have to remove that expression.
That would give you all products including variants in the list - that is something you might not want.
So if you only want masters where one if its variants has this ItemStatusCode, you need to aggregate the value of all ItemStatusCode fields from all variants to an array of ItemStatusCodes on the master. The only way that is currently possible is to do a bit of custom code.
Or you can create a custom field "ItemStatusCodeOnVariants" or something like that, as a string, and then create a SQL that will run in a scheduled task (there is a SQL scheduled task) that will find all variant ItemStatusCode values for each master and add the values as a comma seperated value on the master product in the custom field. Then the index can index it as an array and it can be queryed.
A bit technical, but should be feasable - difficult thing is to write the SQL.
BR Nicolai