Pulling data from all lines in a document into a query?
RespondidaI have a button sat on my quotation screen which fires a sql query UF. The sql query looks like this:
SELECT T0.[Some Fields]
FROM OITM T0
WHERE T0.[ItemCode] = $[$38.1.0]
The problem with this is $[$38.1.0] only returns the item code from the first line. What is my best option here to fire a query in which the WHERE statement is effectively equal to T0.[ItemCode] = ItemCodeLine1 OR ItemCodeLine2 OR ItemCodeLine3....
Any help or direction much appreciated.
Matt
-
Comentario oficial
Hello Matt,
If the document is already created you can do it but you need to add a sub query toobtain all the items in the document instead of selecting just one.
If the document is not created yet, I'm affraid it's so much complicated than just a query, you'll need to store first all the values of the items with a LineLoop and then use a query to obtain the values.
For more information please contact your local reseller.
-
Hi Yaremi,
In this case the document has not been created yet as I am trying to prevent the addition of a document. Its the storing the values from a lineloop that I had been unable to find any information on.
Thanks,
Matt
-
Hello Matt,
We don't have an specific article that creates a temp table. Please contact your partner to request Premium Service.
Iniciar sesión para dejar un comentario.
Comentarios
3 comentarios