Query query = new Query();
QueryBuildDataSource qbds,qbds1;
SysTableLookup sysTableLookup;
#define.DimensionName("ProfitCenter")
DimensionAttribute dimAttr;
sysTableLookup = sysTableLookup::newParameters(tableNum(DimensionFinancialTag), _formStringControl);
dimAttr = DimensionAttribute::findByName("Profitcenter"); //Financial Dimension Name
sysTableLookup.addLookupField(fieldnum(DimensionFinancialTag, Value));
sysTableLookup.addLookupField(fieldnum(DimensionFinancialTag, Description));
qbds = query.addDataSource(tableNum(DimensionFinancialTag));
qbds1 = qbds.addDataSource(tableNum(DimensionAttributeDirCategory));
qbds1.addLink(fieldNum(DimensionFinancialTag,FinancialTagCategory),fieldnum(DimensionAttributeDirCategory,RecId));
qbds1.addRange(fieldNum(DimensionAttributeDirCategory, DimensionAttribute)).value(queryvalue(dimAttr.recid));
sysTableLookup.parmQuery(query);
sysTableLookup.parmUseLookupValue(false);
sysTableLookup.performFormLookup();
QueryBuildDataSource qbds,qbds1;
SysTableLookup sysTableLookup;
#define.DimensionName("ProfitCenter")
DimensionAttribute dimAttr;
sysTableLookup = sysTableLookup::newParameters(tableNum(DimensionFinancialTag), _formStringControl);
dimAttr = DimensionAttribute::findByName("Profitcenter"); //Financial Dimension Name
sysTableLookup.addLookupField(fieldnum(DimensionFinancialTag, Value));
sysTableLookup.addLookupField(fieldnum(DimensionFinancialTag, Description));
qbds = query.addDataSource(tableNum(DimensionFinancialTag));
qbds1 = qbds.addDataSource(tableNum(DimensionAttributeDirCategory));
qbds1.addLink(fieldNum(DimensionFinancialTag,FinancialTagCategory),fieldnum(DimensionAttributeDirCategory,RecId));
qbds1.addRange(fieldNum(DimensionAttributeDirCategory, DimensionAttribute)).value(queryvalue(dimAttr.recid));
sysTableLookup.parmQuery(query);
sysTableLookup.parmUseLookupValue(false);
sysTableLookup.performFormLookup();
No comments:
Post a Comment