Announcements
QueryBuildRange qbr_SalesParmTable1; if (custParameters.xxPendingSalesInvoice == NoYes::Yes ) { QueryBuildDataSource qbds_SalesParmTable = sender.query().dataSourceTable(tableNum(SalesParmTable)); qbr_SalesParmTable1 = qbds_SalesParmTable.addRange(fieldNum(SalesParmTable,xxProFormaInvoice)); qbr_SalesParmTable1.value(strFmt('((%1 == %2) && (%3 == %4))', fieldStr(SalesParmTable, xxProFormaInvoice), SysQuery::valueNotEmptyString(), fieldStr(SalesParmTable, ParmJobStatus), SysQuery::value(ParmJobStatus::Waiting))); qbr_SalesParmTable1.status(RangeStatus::Hidden); }
Query query = new Query();
QueryBuildDataSource qbds = query.addDataSource(tableNum(SalesParmTable));
qbds.addRange(fieldNum(SalesParmTable, xxProFormaInvoice)).value(SysQuery::valueNotEmptyString());
qbds.addRange(fieldNum(SalesParmTable, ParmJobStatus)).value(SysQuery::value(ParmJobStatus::Waiting));
QueryRun qr = new QueryRun(query);
while (qr.next())
{
SalesParmTable parmTable = qr.get(tableNum(SalesParmTable));
info(strFmt("RecId %1, SalesId %2, ProFormaInvoice %3, ParmJobStatus %4", parmTable.RecId, parmTable.SalesId, parmTable.xxProFormaInvoice, parmTable.ParmJobStatus));
}
Query query = new Query();
QueryBuildDataSource qbds = query.addDataSource(tableNum(SalesParmTable));
qbds.addRange(fieldNum(SalesParmTable, xxProFormaInvoice)).value(SysQuery::valueEmptyString());
qbds.addRange(fieldNum(SalesParmTable, ParmJobStatus)).value(SysQuery::valueNot(ParmJobStatus::Waiting));
// You didn't mention this condition by it was in the query string.
// Remove or change it as needed.
qbds.addRange(fieldNum(SalesParmTable, ParmId)).value(queryValue('ICPS-007221'));
QueryRun qr = new QueryRun(query);
while (qr.next())
{
SalesParmTable parmTable = qr.get(tableNum(SalesParmTable));
info(strFmt("RecId %1", parmTable.RecId));
}
qbds_SalesParmTable.addRange(fieldNum(SalesParmTable, xxProFormaInvoice))
.value(SysQuery::valueEmptyString());
qbds_SalesParmTable.addRange(fieldNum(SalesParmTable, ParmJobStatus))
.value(SysQuery::valueNot(ParmJobStatus::Waiting));
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156