Notifications
Announcements
public SysLookupMultiSelectCtrl msCtrl; /// <summary> /// Building the DocuType query /// </summary> /// returns the Docutype Query public Query buildDocuTypeQuery() { Query docuTypeQry = new Query(queryStr(UCLRecipeGroupsQry)); return docuTypeQry; }[FormEventHandler(formStr(UCLModifierGroup), FormEventType::Initialized)] public void UCLModifierGroup_OnInitialized(xFormRun sender, FormEventArgs e) { Query docuTypeQry = this.buildDocuTypeQuery(); FormStringControl DocuTypes = this.design().controlName('UCLModifierGroupLine_UCLRecipeStoreGroups'); InventParameters inventParameters = InventParameters::find(); msCtrl = SysLookupMultiSelectCtrl::construct(this, DocuTypes, querystr(UCLRecipeGroupsQry), false, [tableNum(UCLRecipeStoreGroup), fieldNum(UCLRecipeStoreGroup,Name)]); msCtrl.refreshQuery(docuTypeQry); UCLModifierGroupLine line = this.dataSource(FormDataSourceStr(UCLModifierGroup, UCLModifierGroupLine)).cursor() as UCLModifierGroupLine; if(line.RecId) { msCtrl.set(this.getSelectedNotes(this.getSelectedFields())); } } public str getSelectedFields() { container selectedfields; str ret; UCLRecipeStoreGroup groupStore; while select groupStore { selectedfields+=groupStore.Name; } ret = con2Str(selectedfields,';'); return ret; } /// <summary> /// /// </summary> /// <param name=/sender/></param> /// <param name=/e/></param> [FormControlEventHandler(formControlStr(UCLModifierGroup, UCLModifierGroupLine_UCLRecipeStoreGroups), FormControlEventType::Modified)] public void UCLModifierGroupLine_UCLRecipeStoreGroups_OnModified(FormControl sender, FormControlEventArgs e) { FormRun formRun = sender.formRun(); UCLModifierGroupLine line = formRun.dataSource(FormDataSourceStr(UCLModifierGroup, UCLModifierGroupLine)).cursor() as UCLModifierGroupLine; if(Line) { line.UCLRecipeStoreGroups = con2Str(msCtrl.getSelectedFieldValues(), ';'); } }
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.
Abhilash Warrier 836 Super User 2025 Season 2
André Arnaud de Cal... 441 Super User 2025 Season 2
Martin Dráb 346 Most Valuable Professional