[SOLVED] Evaluating variables in filter

How should i go about evaluating variables within a filter’s expression. My code:

hauslinienFilter = ${request.arguments.hauslinien}
regionFilter = ${request.arguments.region}

count = ${q(node).children(‘mosaicGridItems’).children(’[instanceof Country.Germany:MosaicGridItem]’).filter(’[hauslinien=hauslinienFilter]’).filter(’[region=regionFilter]’).count()}

Is there also a better way to pipe the conditional results?

You can combine multiple expression in a single filter like this:

.filter('[hauslinien=' + this.hauslinienFilter + '][region=' + this.regionFilter + ']') 

If you want or-conditions add a comma between as described here. http://neos.readthedocs.io/en/stable/CreatingASite/TypoScript/EelFlowQuery.html#using-multiple-filters

Please note that you also have to use “this” to access sibling properties in fusion code or that you have to put the filters into the “@context” to access them in the expression.

Regards, Martin

Thanks for the help, got it working.