Hello,
I want to lookup field Name where the IsTemplate value is only true, can anyone help me?
Should i using addRange or something?
Here's my code :
public void lookup()
{
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(Hierarchy), this);
;
queryBuildDataSource = query.addDataSource(tableNum(Hierarchy));
sysTableLookup.addLookupfield(fieldNum(Hierarchy, Name),true);
sysTableLookup.addLookupfield(fieldNum(Hierarchy, Description));
queryBuildRange = queryBuildDataSource.addRange(fieldNum(Hierarchy, IsTemplate));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}