How to group by a common table with a specific field?
I'm getting a syntax error on (dt.fieldname2Id('BatchNo'))
Here's my code:
Common common;
SysDictTable dt;
dt = SysDictTable::newName('Table1');
common = dt.makeRecord();
while select count(RecId) from common
group by common.(dt.fieldname2Id('BatchNo')) //syntax Error here
where common.(dt.fieldname2Id('flag'))==1
{
info(int642str(Common.Recid));
}