static void ExpressionsInQueryRanges_2(Args _args)
{
Query q;
QueryRun qr;
QueryBuildDataSource qbd;
QueryBuildRange qbr;
InventTable inventTable;
;
q = New Query();
qbd = q.addDataSource(tablenum(InventTable));
qbr = qbd.addRange(fieldnum(InventTable , DataAreaId));
qbr.value(strFmt('(%1 == "%2") || (%1 == "%3") ',
fieldStr(InventTable, ItemId),
queryValue("B-R14"),queryValue("B-pack1")));
qr = New QueryRun(q);
while (qr.next())
{
inventTable = qr.getNo(1);
info(strfmt("%1 - %2 - %3 - %4",inventTable.ItemId,inventTable.ItemName,inventTable.ItemType,inventTable.projCategoryId));
}
}