cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Axisus
Level: Powered On

ComboBox multiselection to return the filtered values in another combobbox

Hi,

 

I wanted to know if it was possible to have one combo box that allows multiple selection which returns the values related to the multiple selection in another combo box?

 

For example, combobox1 allows users to select multiple locations they are from. If two locations have been selected, Combobox2 should return all the postcodes related to those two locations. My current formulae only returns postcodes related to the last selected location. 

 

SortByColumns(Filter('[dwrept].[V_CLIENT_WITH_POSTCODE]', ContractBox_2.Selected.client in client), "POSTCODE_DISTRICT") 

 

1 REPLY 1
KroonOfficeSol
Level 10

Re: ComboBox multiselection to return the filtered values in another combobbox

@Axisus

 

Yes it is but you should use SelectedItems instead off Selected. On multiselect you use SelectedItems, which gives back a list of items, and without multiselect you use Selected, which returns a string.

 

Your formula should look in the list off items and the field Clients. So you get this formula:

 

SortByColumns(
	Filter('[dwrept].[V_CLIENT_WITH_POSTCODE]'
	,client in ContractBox_2.SelectedItems.client // one client from the row is matched on the clients in your selectedItems
	)
	, "POSTCODE_DISTRICT"
) 

 

Btw, you are using a SQL table is this correct. You should then have an ClientID in both tables right? So better match on that number field instead. I'm not sure but I would think matching numbers give a better performance.

 

Hope this helps.

 

Paul