i want to lookup filed QuotationId from table SalesQuotationTable based on my conditions below , conditions work right but when i write this line of code [sysTableLookup.addLookupfield(fieldNum(SalesQuotationTable,QuotationId),true);] returns all QuotationId in SalesQuotaionTable not QuotationId which i need from my conditions so my question is how to filter filed with these conditions.
public void lookup(FormControl _formControl, str _filterStr)
{
SalesQuotationLine SalesQuotationLine;
SMAServiceOrderTable _SMAServiceOrderTable;
SalesQuotationTable _SalesQuotationTable;
SysTableLookup sysTableLookup;
sysTableLookup = SysTableLookup::newParameters(tableNum(SalesQuotationTable),_formControl);
select * from _SMAServiceOrderTable where _SMAServiceOrderTable.wo_id==SMAServiceOrderTable.wo_id;
select QuotationId,woid from SalesQuotationLine
where SalesQuotationLine.woid==_SMAServiceOrderTable.wo_id
join _SalesQuotationTable
where SalesQuotationLine.QuotationId==_SalesQuotationTable.QuotationId;
{
sysTableLookup.addLookupfield(fieldNum(SalesQuotationTable,QuotationId),true);
}
sysTableLookup.performFormLookup();
}