Notifications
Announcements
No record found.
Is it possbile? As far as i know it's possible with a query;
msCtrl = SysLookupMultiSelectCtrl::construct(element, TestCtrl, querystr(StudentCourse)); etc...
Regards
*This post is locked for comments
Hi
As I know, isn't possible.
What you can do is exclude some values with the SysFormEnumComboBox class.
A workaround could be use a tmp table, fill with the enum values and use the SysLookupMultiSelectCtrl Class.
Lookups are all about queries. Nevertheless you can fill a temporary table with enum values and use it an a query. SysLookupMultiSelectCtrl offers constructWithQueryRun() factory method for scenarios with a temporary table.
Hi Martin
I have to use tmp table ( either tmp or in momory ) for SysLookupMultiSelectCtrl
using below code
MyTempTable.setTmpData(element.populateTmpTable); queryRun = new QueryRun(queryStr(MyTempQuery));
//AOT MyTempQuery query which has MyTempTable as datasource queryRun.setCursor(MyTempTable); msCtrlCust = SysLookupMultiSelectCtrl::constructWithQueryRun(element, control,queryRun);
Temporay table are population as i have ran the same cod to fill MyTempTable ( making it regular table)
after execution able to see inserted rows. and also with regular table type SysLookupMultiSelectCtrl is showing records in multiselectcontrol too.
However if i change table type to tmp or inmomory then same code showing no records in multiselectcontrol.
Please suggest.
You're not using constructWithQueryRun() correctly - you have to provide a value for _selectField parameter in this case. For example:
msCtrlCust = SysLookupMultiSelectCtrl::constructWithQueryRun( element, control, queryRun, false, [tablenum(MyTempTable), fieldNum(MyTempTable, MyField)]);
Thanks for Reply Martin.
I have added container for select field however there is no records at UI.
while debugging , form data source has no records ( no of loaded records)
SysLookupMultiSelectGrid at this class level
I'm sorry, but I don't have enough information to tell you where you have done something wrong. Ensure yourself that you fill the temporary buffer with data, that your query is correct (e.g. Fields node has Dynamic property set) and if you don't see anything wrong. debug the code.
Try this:
MyTempTable = element.populateTmpTable;
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.
Priya_K 4
Martin Dráb 4 Most Valuable Professional
Ali Zaidi 2