Friday, 12 January 2018

Multi-Select Selector

Hi There,

Want to share with you hidden way to add a multi-select Selector control to have better filters.
Acumatica Multi Selector

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
Acumatica Multi Selector Value

To add such control you need to do following:
  1. 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.
    1. [PXSelector(typeof(Ledger.ledgerCD), ValidateValue = false)]
  2. 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. 
    1. <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!


No comments: