Hi,
I have 1 table (InventTable). I want to compare the itemId of its 2 records using query.
query = new Query();
dsInventTable = query.addDataSource(tableNum(InventTable), tableStr(InventTableA));
dsInventTable = dsInventTable.addDataSource(tableNum(InventTable), tableStr(InventTableB));
dsInventTable.relations(true);
dsInventTable.joinMode(JoinMode::ExistsJoin);
dsInventTable.addRange(fieldNum(InventTable, ItemId)).value(strFmt('(%1 == %2)',
strFmt("%1.%2", qbds.name(), fieldStr(InventTable, ItemId)),
strFmt("%2.%2", qbds.name(), fieldStr(InventTable, ItemId))));
But this does not work, how should I write the code for InventTableB?