How to build query with multiple values. I need to create filter which display only active BOMs in grid and I looking for solution. Here is my code which isnt working:
public void executeQuery()
{
QueryBuildRange qbr;
QueryRun queryRun;
Query q = new Query();
qbr = SysQuery::findOrCreateRange(BOMTable_q.dataSourceTable(tableNum(BOMTable)), fieldNum(BOMTable, BOMId));
if (activeButton==false)
{
qbr.value(SysQuery::valueUnlimited());
}
else
{
while select BOMVersion where BOMVersion.Active==true && BOMVersion.Approved==true{
qbr.value(queryValue(BOMVersion.BOMId));
}
super();
You have two options:
QueryBuildDataSource qbds = q.dataSourceTable(BOMTable);
QueryBuildRange qbr;
while (...)
{
qbr = qbds.addRange(fieldNum(BOMTable, BOMId));
qbr.value(queryValue(BOMVersion.BOMId));
}
QueryBuildRange qbr = q.dataSourceTable(BOMTable).addRange(fieldNum(BOMTable, BOMId));
container c;
while (...)
{
c+= queryValue(BOMVersion.BOMId);
}
qbr.value(con2str(c));