Hello sirs, I want to imitate this dropdown box with a grid selection
Can anyone give me an idea how to do this?
Thanks again.
Hello sirs, I want to imitate this dropdown box with a grid selection
Can anyone give me an idea how to do this?
Thanks again.
Thank you for the suggestions everybody, it worked.
Just add the field that you want to drop down and set EDT (VendAccount) and that's it.
Hi,
I think the fields vendaccountnum and name are from same tables .
Please try the below code.
Please create a stringedit field in your form and overwrite the lookup method for that field and you will able to get the desired output.
public void lookup()
{
Query query = new Query();
QueryBuildDataSource qbds;
QueryBuildDataSource QbdsJoin;
SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(PurchTable), this);
;
super();
qbds = query.addDataSource(tableNum(PurchTable));
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield(fieldNum(PurchTable, OrderAccount));
sysTableLookup.addLookupfield(fieldNum(PurchTable, PurchName));
sysTableLookup.performFormLookup();
}
Please mark the answer verified if found useful.
Regards,
Hi,
public void lookup()
{
//super();
// Declaration
Query LookupQuery = new Query();
QueryBuildDataSource LookupQueryBuildDataSource;
QueryBuildRange LookupQueryBuildRange;
SysTableLookup CustomSysTableLookup = SysTableLookup::newParameters(tableNum(CustTable), this);
;
// Add fields that you want in Lookups
CustomSysTableLookup.addLookupField(fieldNum(CustTable, AccountNum));
CustomSysTableLookup.addLookupField(fieldNum(CustTable,Currency));
LookupQueryBuildDataSource =
LookupQuery.addDataSource(tableNum(CustTable));
LookupQueryBuildRange=
LookupQueryBuildDataSource.addRange(fieldNum(CustTable,AccountNum));
//LookupQueryBuildRange.value(queryValue(NOYESCOMBO::Yes));
// Execute the Query
CustomSysTableLookup.parmQuery(LookupQuery);
CustomSysTableLookup.performFormLookup();
}
Please try the above code.
Any modify according to your needs.
Regards,
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,277 Super User 2024 Season 2
Martin Dráb 228,126 Most Valuable Professional
nmaenpaa 101,148