[FormControlEventHandler(formControlStr(A, B), FormControlEventType::Lookup)]
public static void B_LineNumber_OnLookup(FormControl sender, FormControlEventArgs e)
{
SysReferenceTableLookup tableLookup = SysReferenceTableLookup::newParameters(tableNum(X), sender);
FormRun formRun = sender.formRun();
Query query = new Query();
QueryBuildDataSource qbds = query.addDataSource(tableNum(X));
A solTable = sender.formRun().dataSource(formDataSourceStr(A, B)).cursor();
qbds.addRange(fieldNum(X, SolutionId)).value(solTable.SolutionId);
tableLookup.parmQuery(query);
tableLookup.addLookupfield(fieldNum(X, LineNumber));
tableLookup.addLookupfield(fieldNum(X, SolutionId));
tableLookup.performFormLookup();
FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs;
ce.CancelSuperCall();
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,435 Super User 2024 Season 2
Martin Dráb 228,317 Most Valuable Professional
nmaenpaa 101,148