I've been staring at this code most of the afternoon, but cannot seem
to find the problem. When a user first enters this section 4 records
are returned. If the user does a query for a product number "sc12"
the query always returns the product number "12". It so happens that
product number "12" is the first record in the selection when all 4
records are returned. Anyone see something I just missed?
if ($attributes{"nm"} # "")
query([stockproduct];[stockproduct]productno = replace string
($attributes{"nm"}; "*"; "@");*)
query([stockproduct];&;[stockproduct]Customer_Num = replace string
(get session("user.id"); "*"; "@"))
else
Get_StockProduct_Selection( get session("user.id") ; "@" )
end if
if($attributes{"group"} # "")
query selection([stockproduct];[stockproduct]prodclass = replace
string($attributes{"group"}; "*"; "@"))
end if
if($attributes{"type"} # "")
query selection([stockproduct];[stockproduct]prodsubclass = replace
string($attributes{"type"}; "*"; "@"))
end if
order by([StockProduct]; [StockProduct]ProdClass; > ; [StockProduct]
ProdSubClass; >)
$map := """
ProdNum: [StockProduct]ProductNo;
Group: [StockProduct]ProdClass;
Type: [StockProduct]ProdSubClass;
Quantity: [StockProduct]PackageQty;
Description: [StockProduct]Desc1+[StockProduct]Desc2;
PhysicalInv: [Product_Inventory]Qty_Physical;
OrderQuantity: [Product_Inventory]Qty_Allocated+[Product_Inventory]
Qty_BackOrder"""
$callback:="""query([Product_Inventory];[Product_Inventory]
StockProduct_ID=[StockProduct]ID)"""
$qryStockProduct := RowSet.newFromSelection(->[StockProduct]; $map;
-1; $callback)
Christian Cypert
[EMAIL PROTECTED]
The Guide is definitive. Reality is frequently inaccurate.
- Douglas Adams
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/