Hello,
I need to add new link to existing query.
I do something like :
QueryRun queryRun; Query query; QueryBuildDataSource qbds; query = queryRun.query('CustTableCube'); queryRun = new queryRun(query); /********** *****/ qbds = queryRun.query().dataSourceNo(1).addDataSource(tableNum(MyTable));
qbds.relations(true);
qbds.joinMode(JoinMode::InnerJoin);
qbds.addLink(fieldNum(CustTable, AccountNum), fieldNum(MyTable, MyAccount)); qbds.addRange(fieldNum(CustTable, AccountNum).value('1234');
For some reason the lines after the asterisks are ignored, so when I an doing:
while (queryRun.next()) { /* some code */ }
I am reaching the code in the while clause.
I have tried also moving the line :
queryRun = new queryRun(query);
just before the loop
and do :
qbds = query().dataSourceNo(1).addLink(fieldNum(CustTable, AccountNum), fieldNum(MyTable, MyAccount));
instead of line:
qbds = queryRun.query().dataSourceNo(1).addDataSource(tableNum(MyTable));
What may be wrong?
Thanks :)
*This post is locked for comments