To get selected query range value
In My case need to get selected query range value from existing query.
Conditions
In My case need to get selected query range value from existing query.
Conditions
- If range is applied need to filter based on the range
- If range not applied default it should take system language
QueryBuildDataSource qbdsProductTranslation;
QueryBuildRange queryBuildRange;
QueryFilter queryFilter;
QueryRun queryRun;
qbdsProductTranslation = _query.dataSourceTable(tableNum(EcoResProductTranslation));
queryFilter =
_query.findQueryFilter(qbdsProductTranslation, fieldStr(EcoResProductTranslation, LanguageId));
if(!queryFilter
|| !queryFilter.value()) //To handle the situation
like If languageId is added to Range set to empty and If LanguageId is not
added to Range
{
queryBuildRange = qbdsProductTranslation.addRange(fieldNum(EcoResProductTranslation,LanguageId));
queryBuildRange.value(SystemParameters::getSystemLanguageId());
queryRun = new
QueryRun(_query);
_query
= queryRun.query();
}
//setExecutionIdRangesOCP
No comments:
Post a Comment