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

Removing duplicates from dropdown and filtering comboxbox records (SP LIST DATA SOURCE)

Hi All, 

 

I have a dropdown box with the following: 

ItemsDistinct('Sales Order Tracker','Shipping Plant Legacy')

 

I have a combobox with the following: 

Items - Distinct(Filter('Sales Order Tracker','Shipping Plant Legacy'=Dropdown2.Selected.'Shipping Plant Legacy'),'Blackout Order #')

OnChange -Set(BlackoutVar,LookUp('Sales Order Tracker','Blackout Order #'= OrderNo_Combo.Selected.Result))

 

Basically I want to select a Shipping Plant from my dropdown box which will  pre-filter the results of the combobox dropdown for the Order # (Only want to show order #'s from the selected shipping plant)

 

I cant work out why my combobox wont accept the dropdown box filter with duplicates removed can someone please advise? 

 

lg270492_0-1665045950805.png

 

Appreciate any help given! 

 

Thanks all

1 ACCEPTED SOLUTION

Accepted Solutions

@lg270492 

 

I think you need to select the Order # Control, go to the right, click on "Edit" under "Fields", and under Primary Text and/or Secondary text, change it to Result.

 

See if it works @lg270492 

View solution in original post

10 REPLIES 10

@lg270492 

 

Distinct function returns a Table with a single column Result

 

Check the Default property of your Control(s)  - you may need to append .Result to the end of it, if appropriate.

Thanks for the reply, both default properties are blank, do they need something in them? 

 

 

@lg270492 

 

Only if you are expecting them to have a pre-populated value in them automatically without manually selecting them.

If they are supposed to be blank by default, then leave Default alone.

 

Could you clarify what you mean by


@lg270492 wrote:

I cant work out why my combobox wont accept the dropdown box filter with duplicates removed

 


What do you mean that it won't accept it? What is the behavior you are observing, on which Control is the behavior happening, and what are you expecting to happen instead?

So I would like to select the shipping plant firstly using dropdown2. Once this is selected id like the results in the OrderNo_Combo to be automatically filtered based on the pre selection of the shipping plant. So this will only show orders for a specific selected shipping plant.

 

If I remove the duplicate filter on dropdown2 then it works, but then I have many duplicates in dropdown2. How can I remove duplicates from shipping plant AND have pre filtered results in my combobox? 

 

Hope this is clear for you now

 

Thanks again for the reply really appreciate your help! 

@lg270492 

 

1. Is there any error shown?

2. Does the ComboBox just have no values at all when you use your formulas as given?

1. An error shows up when I use distinct to remove the duplicates from my dropdown, on the combobox for Order#:

lg270492_0-1665047886454.png

2. The combobox shows no values when I use distinct to remove the duplicates in my dropdown. If the dropdown isnt using distinct it works fine but then the dropdown shows far too many duplicates for it to be useful. 

 

Thanks! 

 

@lg270492 

 

I think the reason is because Distinct only return one column, Result, but the Filter is returning all the columns.

 

That's why it is not working.

 

But I only want it to return one column.. just filtered. 

 

Then once it does, i want to use that value to filter my combobox dropdown values? 

@lg270492 

 

I think you need to select the Order # Control, go to the right, click on "Edit" under "Fields", and under Primary Text and/or Secondary text, change it to Result.

 

See if it works @lg270492 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,732)