Hi Guys,
I am using the following query to retrieve a batch by its location.
But when i execute the qeury, the "Existing Values" button retrieves all locations to select from.
How can i filter these results in the existing values, so the user can only select the locations from it's own warehouse?
SELECT T0.ItemCode, T0.BatchNum, T0.WhsCode, T1.ItemName, T0.Quantity, T0.Located, T1.SalUnitMsr, T2.Name FROM OIBT T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode INNER JOIN [@SUBGROUPS] T2 ON T1.U_se_subgrp = T2.Code WHERE T0.Located = '[%0]' AND T0.Quantity > 0 AND T0.WhsCode = '04'
Let me clear up my question.
When run the query in sbo, it will ask me to select a location as a parameter.
This is parameter '%0'.
So the user will click the "Existing Values" button to select a location.
Now a window will open with all the locations in the table OITB to select from.
Now i want to decrease the number of location that are visible in the "Existing values" window.
I only want to show the locations of warehouse 04.
This way the user is unable to select a location from a different warehouse.
After the user selected the parameter he will click the OK button to run the query.
Thanks in Advance
Edited by: wvaert on Jun 24, 2010 2:38 PM