Hi
I have the following fields from two tables, I need to filter the second field based on the selected value from the first field.
I have created a lookup method on the datasource under the second field,am aware aware that I must filter based on the first field selection.
this is my code and its not filtering,how do i resolve this.
public Common lookupReference(FormReferenceControl _formReferenceControl)
{
HcmRatingLevel ret;
SysReferenceTableLookup sysReferenceTableLookup;
QueryBuildDataSource queryBuildDataSource,queryBuildDataSourceRating;
QueryBuildRange qbr;
Query query = new Query();
sysReferenceTableLookup =
SysReferenceTableLookup::newParameters(tableNum(HcmRatingLevel),_formReferenceControl, true);
queryBuildDataSource = query.addDataSource(tableNum(HcmRatingLevel));
queryBuildDataSourceRating = queryBuildDataSource.addDataSource(tableNum(HcmRatingModel));
queryBuildDataSourceRating.relations(true);
queryBuildDataSourceRating.joinMode(JoinMode::InnerJoin);
qbr = queryBuildDataSourceRating.addRange(fieldNum(HcmRatingModel,RatingModelId));
sysReferenceTableLookup.addLookupfield(fieldNum(HcmRatingLevel, RatingLevelId));
sysReferenceTableLookup.addLookupfield(fieldNum(HcmRatingLevel, Description));
sysReferenceTableLookup.addLookupfield(fieldNum(HcmRatingLevel, Factor));
sysReferenceTableLookup.parmQuery(query);
ret = sysReferenceTableLookup.performFormLookup();
return ret;
}