cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Filter data for Combobox

Hello all,

I'm looking for some option, if there is any, to filter Items for Combobox. I have data table where I have multiple columns like Area, OrgUnit, Country... First I'd like to preselect with Dropdown Area and based on this I'd like to allow search in Combobox over column OrgUnit as there is plenty of lines.

There is maybe some another way how to solve this, but I don't see it...

 

Thank you for your help.

Pavel

12 REPLIES 12
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: Filter data for Combobox

You can list all Distinct areas in the dropdown control, and use a Filter to limit the items from the combobox.

 

For example, if your data source is called Orgs, then you can have the following expressions:

Dropdown1.Items: Distinct(Orgs, Area)
Combobox1.Items: Filter(Orgs, Area = Dropdown1.Selected.Result)
Combobox1.DisplayFields: ["OrgUnit"]
Combobox1.SearchFields: ["OrgUnit"]
Super User
Super User

Re: Filter data for Combobox

Hi @CarlosFigueira,

 

It seems like this is not working, so I will go to detail.

I have imported excel file - OrganizationUnit, here I have Area and Name, I'd like to filter by Area (DropDown) and Display and Search on Name (Combobox).

I used for combobox:

Filter(OrganizationUnit_1;Area = DropdownArea.Selected.Result)

But there is displayed error: There was expected operator (for example +,*,&&).

 

PATroubleComboBox.PNG

 

So do you have some other suggestion?

Have nice day

Pavel

 

Power Apps Staff CarlosFigueira
Power Apps Staff

Re: Filter data for Combobox

It turns out that you're hitting a bug in the combobox control that doesn't happen in English (which is why I didn't see it when I tried). When I opened the Web Studio in Czech, I see the same error as you do, even for the same app.

 

I've reported this bug to the owner of that control. One possible workaround for now is to consider using the English version of the authoring, by appending ?l=en-US in the web authoring page (https://create.powerapps.com/studio/?l=en-US). Not ideal, as you may need to explicitly set the formatting for your locale, but it may help for now.

 

@miglisic may know of some other workarounds for this problem.

Power Apps Staff Jeremy_Rodgers
Power Apps Staff

Re: Filter data for Combobox

Here is a possible mitigation for you to try:

instead of:

Combobox1.Items: Filter(Orgs, Area = Dropdown1.Selected.Result)

try this:

 

Combobox1.Items: Filter(Orgs, Area = Dropdown1.Selected.Value)

We're continuing the investigation around the error resulting from the original formula that you reported.

 

Thanks,
Jeremy

 

Super User
Super User

Re: Filter data for Combobox

Hi @CarlosFigueira is there a chance to share with some expected date to fix this bug? It will be nice to have some date in hands 🙂

 

BR

Pavel

Super User
Super User

Re: Filter data for Combobox

Hi @Jeremy_Rodgers both have same issue. I'm not able to filter in combobox.

Pavel

Meidhi_78410
Level: Powered On

Re: Filter data for Combobox

try

Combobox1.Items: Filter(Orgs, Area in Dropdown1.SelectedItems.Result)
Super User
Super User

Re: Filter data for Combobox

Hi @Jeremy_Rodgers,

It looks like that this bug was fixed and it is working as I expected. I am able to filter items for combobox with selected item in dropdown and search in such filtered items...

Can you confirm this?

P.

eopara
Level: Powered On

Re: Filter data for Combobox

Still doesn't work... Please help look into this...

Helpful resources

Announcements
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,600)