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

ComboBox not populating with filter

I have two lists: Objectives
Objectives.png

and Projects

Projects.png
On my edit form for Projects, I need the user to multi-select Functional Objectives from a set of choices (Title) in Objectives where ObjectiveYear = PlanYear.  (PlanYear is a global choice variable set within the app.  It is correctly set to the value "2018" as shown below. The selected values should then be stored in Projects.FunctionalObjectives.

PlanYear.png

 

Edit Project.png

If I set Items to Objectives.Title, I get a list of values to select from, but it includes both 2018 and 2019 rows.

If I filter Items to include the condition on ObjectiveYear as shown below in Items, I get an empty list.  Objectives only has 24 rows so it is not a delegation issue.

ComboBox Setup.png

Objectives has valid data, with 2018 in the ObjectiveYear.

Objective Data.png

 

What am I doing wrong that is preventing me from getting the filtered list displayed?  I use Filter all the time and normally don't have this issue although I am normally only using one data source within a form, rather than using a second list to provide the valid choices like I am here.

 

Help greatly appreciated... my forehead is getting bloody trying to solve this one.  I fear a concussion soon!!!

 

Thanks,

LRVinNC

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: ComboBox not populating with filter

Hi @LRVinNC,

I have made a test on my side, please take a try with the following workaround:

Set the OnVisible property of the first screen (or Edit screen) of my app to following formula:

ClearCollect(
FilteredObjectiveCollection,
Filter('20181016_case12_Objectives',ObjectiveYear.Value="2018").Title
)

On your side, it should be:

ClearCollect(
FilteredObjectiveCollection,
Filter(Objectives,ObjectiveYear.Value= PlanYear.Selected.Value).Title
)

Set the Items property of the Combo box control (on your side, it is DataCardValue105) to following formula:

Filter(
Choices('20181016_case12_Projects'.FunctionalObjective),
Value in FilteredObjectiveCollection
)

On your side, it should be:

Filter(
Choices(Projects.FunctionalObjective),
Value in FilteredObjectiveCollection
)

The GIF screenshot as below:Test1.gif

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
samuelJ
Level 8

Re: ComboBox not populating with filter

Hi @LRVinNC,

 

Can you try:

Filter(Objectives, ObjectiveYear = PlanYear.Selected.Value).Title

 Or:

Filter(Objectives, ObjectiveYear = PlanYear).Title

If these dont work. There appears to be a little yellow warning sign over the Items field.  If you hover over that, what does it provide? 

Super User
Super User

Re: ComboBox not populating with filter

Thanks @samuelJ, but unfortunately neither of those are valid syntax because both fields are choice fields. The yellow triangle is a delegation warning, but delegation is not an issue with a 24-row list so it can be ignored.

 

I just stumbled across this question and the response by @CarlosFigueira, (https://powerusers.microsoft.com/t5/General-Discussion/How-to-filter-choices-on-Combobox/td-p/101436), and applying its recommended format, I think I am getting closer. BUT it is still not returning any values...

 

Filter( Choices(Projects.FunctionalObjective), Value in Filter(Objectives, ObjectiveYear.Value = PlanYear.Selected.Value).Title)

 

More ideas welcome!

Super User
Super User

Re: ComboBox not populating with filter

Hi @LRVinNC,

Save yourself the aggravation and convert your choice columns in SharePoint to single line of text or add a calculated column and choose the Choice column.  Then use the new calculated column in Powerapps. IMHO Choice type columns are actually embedded tables and are meant to be used in SharePoint but not in Powerapps. 

Community Support Team
Community Support Team

Re: ComboBox not populating with filter

Hi @LRVinNC,

I have made a test on my side, please take a try with the following workaround:

Set the OnVisible property of the first screen (or Edit screen) of my app to following formula:

ClearCollect(
FilteredObjectiveCollection,
Filter('20181016_case12_Objectives',ObjectiveYear.Value="2018").Title
)

On your side, it should be:

ClearCollect(
FilteredObjectiveCollection,
Filter(Objectives,ObjectiveYear.Value= PlanYear.Selected.Value).Title
)

Set the Items property of the Combo box control (on your side, it is DataCardValue105) to following formula:

Filter(
Choices('20181016_case12_Projects'.FunctionalObjective),
Value in FilteredObjectiveCollection
)

On your side, it should be:

Filter(
Choices(Projects.FunctionalObjective),
Value in FilteredObjectiveCollection
)

The GIF screenshot as below:Test1.gif

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Super User
Super User

Re: ComboBox not populating with filter

Kris, Many thanks! Works flawlessly. I'm just beginning to learn the value of utilizing collections. Thanks for pointing the way. Lori
Vasco
Level: Powered On

Re: ComboBox not populating with filter

What is wrong with Combobox or DropDown controls? When the filter get only an item I can't see the item, but the I can see if he filter get more than one item ? If the filter get only an item i just can't see or select the item.

 

I have he code in a Combobox: SortByColumns(Filter('NEE';Email_Prof=DataCardValue2.Text);"Title";Ascending)

and I have a sharepoint List.

 

Anyone could help?

Thanks.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,709)