Notifications
Announcements
No record found.
Hi,
I have to filter my Form using the Customer Account Field. I am Using Multiselect lookup control. When i select only one Range it works correctly. But when i select multiple Values its not working. Help me on this. Here i have attached my code. Thanks in Advance.
public void executeQuery() { Query query1 = new Query(); QueryBuildDataSource qbds1; QueryBuildRange queryrange; QueryRun queryrun1; str Custacc = CustAccount.valueStr(); qbds1 = this.query().dataSourceTable(tableNum(SalesTable)); qbds1.addRange(fieldNum(SalesTable,CustAccount)).value(queryValue(Custacc)); super(); }
Hi Ram,
For multi select controls, are you not storing the selected values in containers?
Please share the code for how you were adding the range in that case.
Hi Gunjan,
public boolean modified() { boolean ret; ret = super(); SalesTable_ds.query().dataSourceTable(tableNum(SalesTable)).clearRanges(); SalesTable_ds.executeQuery(); return ret; }
public void lookup() { Query query = new Query(); QueryBuildDataSource qbds; QueryRun queryrun; ListIterator itr ; SysLookupMultiSelectCtrl syslookupmulty; List list = new List(Types::String); list = strSplit(CustAccount.valueStr(),";"); itr = new listiterator(list); qbds = query.adddatasource(tablenum(SalesTable)); qbds.fields().addfield(fieldnum(SalesTable,CustAccount)); while(itr.more()) { qbds.addrange(fieldnum(SalesTable, CustAccount)).value(itr.value()); itr.next(); } queryrun = new QueryRun(query); syslookupmulty = syslookupmultiselectctrl::constructWithQueryRun(element,CustAccount,queryrun); super(); }
Here is my Lookup code and Modified method on String edit filter control.
Please try something like this -
ListEnumerator listEnumerator; container conRangeCriteria; str range = ''; list = Global::strSplit(list, ';'); listEnumerator = list.getEnumerator(); while (listEnumerator.moveNext()) { conRangeCriteria = listEnumerator.current(); } range = SysOperationHelper::convertMultiSelectedValueString(conRangeCriteria); range = strReplace(range, ";" , ", "); qbds.addrange(fieldnum(SalesTable, CustAccount)).value(range);
Any luck with this?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 490 Super User 2025 Season 2
Martin Dráb 429 Most Valuable Professional
BillurSamdancioglu 241 Most Valuable Professional