Want to share with you hidden way to add a multi-select Selector control to have better filters.
There is a special UI Control px:PXMultiSelector that allows you to select multiple values in the same field. Values will be stored in the field with Semicolon Separator. For example in the field like shown above we will have following value: ACTUAL; BUDGET
To add such control you need to do following:
- Define a selector on the DAC field. Please note that you should disable Validate value, as selector will try to search combined value in DB and fails with error.
[PXSelector(typeof(Ledger.ledgerCD), ValidateValue = false)]
- Second step will be UI control definition. Note that there is no such control in the list of available controls, so you have to edit ASPX directly, but it is easy to replace PXSelector with PXMultiSelector. Do not forget Commit changes if you need to filter by this field.
<px:PXMultiSelector runat="server" DataField="Ledger" ID="CstPXSelector4" CommitChanges="True" ></px:PXMultiSelector>
Multi-Value selector will be good with new In<> Bql operator in Acumatica 2017 R2
Have a nice development!