I have a form that gets all SalesLines that have "back ordered" items. I use a temp table to get that done and it works fine. I would like to go to an ItemID on the InventTable, then click a button to open this form filtered on that ItemID. I've looked at other forms that are set up like this, but I'm not getting anywhere. Need a little push. Here's the code I have right now. I created a TempTable with some fields and used that as my data source, then populated it.
public void init()
{
super();
this.getBackorders();
}
void getBackorders()
{
SalesTable salesTable;
SalesLine salesLine;
pjpTestTempTable salesLinetmp;
Counter recordsFound;
;
salesLinetmp.setTmp();
while select * from salesTable
join salesLine
where salesTable.SalesId == salesLine.SalesId
&& salesTable.SalesStatus == SalesStatus::Backorder
{
if(salesLine.mbsBackOrderLinesTotal() > 0 )
{
salesLinetmp.Itemid = salesLine.ItemID;
salesLinetmp.ItemName = salesLine.SalesID;
salesLinetmp.BackOrders = salesLine.mbsBackOrderLinesTotal();
salesLinetmp.doInsert();
}
pjpTestTempTable.setTmp();
pjpTestTempTable.setTmpData(salesLinetmp);
}
}