Execute parameterized query giving error when using IN syntax in query

I am using a query in execute parameterized query activity and it works fine as long as parameter is compared using '=' sign. It gives error when using 'IN'. For reference, the query is - select pp1 as "StandadrCost", BU, plant, buallocneteau as "EAU" from summmatrldmnd where partnumber = 123 and BU IN ('test1', 'test2'). And the error I am getting is : Caused by: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "$1"  Position: 1    at (JavaAction : 'Execute parameterized query')
1 answers

The only solution I know is to create the query as a string and add the 'BU IN ( )' part dynamically. If there are no BU filters leave it out.