QBDS relations

private void dlgItemId_lookup(FormComboBoxControl _ctrl) { SysTableLookup sysTableLookup; Query query = new Query(); QueryBuildDataSource qbds; ; dialog.dialogOnClient_RU().updateServer(); sysTableLookup = SysTableLookup::newParameters(tableNum(InventTable), dialog.curFormControl_RU()); qbds = query.addDataSource(tableNum(InventTable)); qbds = qbds.addDataSource(tableNum(EcoResProductCategory)); qbds.addLink(fieldNum(InventTable, Product), fieldNum(EcoResProduct, RecId)); qbds.joinMode(JoinMode::ExistsJoin); qbds = qbds.addDataSource(tableNum(EcoResCategory)); qbds.addLink(fieldNum(EcoResProductCategory, Category), fieldNum(EcoResCategory, RecId)); qbds.joinMode(JoinMode::ExistsJoin); qbds.addRange(fieldNum(EcoResCategory, Name)).value(SysQuery::value(dlgCategoryName.value())); sysTableLookup.addLookupfield(fieldNum(InventTable, ItemId)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.