cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Distinct and Filter not working to populate combo box

I have read a number of posts explaining how to use Distinct + Filter and as far as I can tell, I'm implementing them correctly. Hopefully, someone can see something I'm not.

 

I have a SP List as a lookup table (intune_applications_naming_convention_nodes) with 3 main columns: |node_os|policy_context|application_name|

I'm trying to connect 3 combo boxes to the List, one for each column.

In the first column, I just grab Items as

Distinct(intune_application_naming_convention_nodes,node_os)

I get all the records for os returned. When I try to setup the second combo box, I get 2 empty items if I use Distinct

Distinct(Filter(intune_application_naming_convention_nodes, node_os = app_os.Selected.Result),policy_context)

 but I get 3 visible items if I leave it out

Filter(intune_application_naming_convention_nodes, node_os = app_os.Selected.Result)

 I'm not sure what I'm missing here.

second combo box filters items based on combo 1, but Distinct failssecond combo box filters items based on combo 1, but Distinct fails

 

not sure how to FIlter the items. for 3rd combo box based on previous twonot sure how to FIlter the items. for 3rd combo box based on previous two

 

15 REPLIES 15

No problem, thanks for sharing the data. I am going to recreate this and get back to you soon. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

Attached is a document that shows this step-by-step. It works perfectly fine, please let me know if it doesn't work for you. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

View solution in original post

Thank you so much for the detail in recreating the scenario @PowerAddict . The script I used in both second and third combo boxes matches yours and the first SP List still doesn't work but the second SP List it did work...so I'm going to recreate the SP List and see if maybe that gets it working.

 

Do you have recommendations for how to get the published app to behave like the play feature while editing? When I use the play button (or hold the alt key) while building the app, the 3rd combo box right-side works, but when I try the combo boxes on the published app, the 3rd combo box doesn't work. I just double checked and re-saved/re-published app.

Do function definitions within the powerapps builder indicate whether they are delegable or not? Or do you have to figure out from error/warning messages? Like let's say, I did have 2100 SP items and I wanted to populate (a bad idea I know) the combo boxes. How do I know if the Filter() can delegate or not?

 

Cheers,

Follow-up @PowerAddict . I recreated the SP List and created a new connector. When I first tested combo 3 it didn't work. I looked at the Fields property inspector. It was set to the wrong column of the SP List, so I changed it to application_name. I then tried the Filter() without Distinct and it retrieved items.

Filter(intune_application_naming_convention_nodes, node_os=app_os.Selected.Result,policy_context=app_context.Selected.Result)

Now, when I inspect the Fields property, it displays: application_name.

When I first add the Distinct()

Distinct(Filter(intune_application_naming_convention_nodes, node_os=app_os.Selected.Result,policy_context=app_context.Selected.Result),application_name)

when I inspect the Fields property, both Primary text and SearchField are blank. However, after letting the app sit without changes for 15 minutes, combo 3 now works with the Distinct() and the Fields inspector lists "Result" for both. So now its working?

 

I just wanted to point out that perhaps me changing the Fields Primary text to the correct might have done something?? not sure. 

 

Multiple Filters now working. Fields properties look good.Multiple Filters now working. Fields properties look good.With Distinct() Fields properties are blank..With Distinct() Fields properties are blank..

I will check in a few minutes but is it now working for you everytime? Did you end up using the formula I shared?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (7,307)