Use output data from one Query in another query


I need to use my sku data i get from my first query in the second query. But i dont get it right.
Please look at the Screenshot.

I thought it would be possible to use something like {{}}
But it does not work and i did not find any usable solution.

it looks like Hole_Umlagerungen could be returning an array of objects.

in query1, you should be able to map that array to get the list of skus.
try something like
{{ => e.sku)}}
or if that doesnt work you could try

Thanks matthewej. It worked to get the skus but i think it is not formatted in the right way.
The query does not return any data.

When i hover over the {{ => e.sku)}} i get the following output: [ "Art-56789-fba", "Art-51598", "Art-51598-sl", "Art-56772-de-fba" ]

But for sql it should be:


If query1 is using a Microsoft SQL Server resource, you can join the sku javascript array into a singular string and then use the SQL string_split function. That would look like

WHERE Artikelnummer IN (
  select VALUE FROM string_split({{ => e.sku).join(",")}}, ',') 
AND kFirma = 1;

If query1 is using a different version of SQL, you could try a partial match using LIKE compared to the javascript string

WHERE {{ => e.sku).join(",")}} LIKE '%' + Artikelnummer + '%'

You need to indicate which column in the you want to find Atrikelnumner in.

If, as it seems from your description, you want it in SKU, try where Atrikelnumner = any( The syntax is a bit different when you are searching in an array ANY([...]) vs a string list of values IN (...).