qbds.addRange(fieldNum(YourView, ValidFrom)).value(queryRange(null, currentDate));
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(View), this);
Query query = new Query();
QueryBuildDataSource queryBuildDataSource = query.addDataSource(tableNum(View));
queryBuildDataSource.name('View');
queryBuildDataSource.addRange(fieldNum(View, ValidFrom)).value
(
strFmt(
'(%1.%2 < %3)',
queryBuildDataSource.name(),
fieldStr(Table, ValidFrom),
DateTimeUtil::getSystemDateTime()
)
);
sysTableLookup.addLookupfield(fieldnum(View, Field));
//add any field needed
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
André Arnaud de Cal... 291,904 Super User 2024 Season 2
Martin Dráb 230,605 Most Valuable Professional
nmaenpaa 101,156