I add 2 datasources in form , then I add this code in the init method of form
parmid = element.args().parm(); query = new Query(); queryBuildDataSource = query.addDataSource(tableNum(LoadLicenseLevel)); queryBuildDataSource.addRange(fieldnum(LoadLicenseLevel,ParentMenuItem)).value(parmid); queryBuildDataSource1 = queryBuildDataSource.addDataSource(tableNum(TreeNode)); queryBuildDataSource1.addRange(fieldnum(TreeNode,MatrixRole)).value(MatrixID.valueStr()); queryBuildDataSource1.joinMode(JoinMode::InnerJoin); queryBuildDataSource1.relations(false); queryBuildDataSource1.addLink(fieldNum(LoadLicenseLevel, EukBrowsedMenuItems), fieldNum(TreeNode, SecurableName));
But I don't get the exact values.