query about how to use view to add look up

Hi guys,

How to add view and view fields to lookup… to form control

We can use Table and Table fields to add lookup like with use systablelookup

SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(HCD_OTSTable),_ctrl)

sysTableLookup.addLookupfield(fieldnum(HCD_OTSTable,ExtractProdId))

But how can we add view and view fields to lookup…

Thanks …

Kumar

It’s the same. For example:

SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(DirPartyNameView), _ctrl);
sysTableLookup.addLookupfield(fieldnum(DirPartyNameView, Name));
sysTableLookup.performFormLookup();