Multi Select ListBox filter record

  

Hi guys,

I am trying to implement 2 list box in which Records are displaying from the one entity but whatever is selected in one list box should be display in other list box

What i trying to do is on change i am refreshing the entity and component but select2 widget change his behavior on ajax refesh.

is there way to implement that records which are selected in one listbox should not be display or selected  in another listbox.

Hi Amin,

First of all, I didn't really get what's the relation between your two List Boxes and a Select2 widget, can you further explain it?

As for your List Boxes not displaying the same content, I'd say you want each of your List Boxes to have as a Source Record List a different aggregate that filters out exclusion keywords (for the first List Box aggregate), and inclusion keywords (for the second List Box aggregate). This way the possibilities will be restricted by what wasn't already select on the other List Box.

Then, every time you select something in one of the List Boxes, you'd need to refresh the other List Box to update the data it displays.

Jorge Martins wrote:

Hi Amin,

First of all, I didn't really get what's the relation between your two List Boxes and a Select2 widget, can you further explain it?

As for your List Boxes not displaying the same content, I'd say you want each of your List Boxes to have as a Source Record List a different aggregate that filters out exclusion keywords (for the first List Box aggregate), and inclusion keywords (for the second List Box aggregate). This way the possibilities will be restricted by what wasn't already select on the other List Box.

Then, every time you select something in one of the List Boxes, you'd need to refresh the other List Box to update the data it displays.




Thanks For Reply Martins, 

Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, infinite scrolling of results .it transform the list box into this

Can u explain your above approach .how would u filter the aggregate in run time and set keyword in aggregate in from list box?

Which Select2 are you using? The "Select2" pattern from Silk UI Web Patterns? or did you get it from the Forge? In this case, is it the Select2 or the AutoCompleteTag component?

as for filtering the queries at runtime... every time you select an option, you can trigger a server side action via Ajax... you just need to use the Refresh Data tool on the correct Preparation query to make sure it re-evaluates the filters and doesn't include any records that are already selected on the other list box