web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : U3SIZnsEzxCrzPHCwrMVZr
Power Apps - Building Power Apps
Answered

Sharepoint -> PowerApps: Dropdown filter based on field

Like (0) ShareShare
ReportReport
Posted on 17 Feb 2021 15:21:27 by 42

Hopefully somebody knows what I am doing wrong

 

As the title says, I want to filter a dropdown field based on the text of another field.

Now I have found many ways to do this. The one that kinda worked is 

 

Distinct(Filter('Corsa Group soorten lijst', Title = DataCardValue4.Text).Plant,Plant)

 

I have a SP list where the Supplier, Plant, Type etc are filled in with the data so that when PowerApps needs to filter, it knows which record to search for.

 

I don't know why, but the Supplier (Acsa) that has 1 Plant, the dropdown shows the option. The Supplier (Kinofarms) that has multiple Plant doesn't show anything.  Furthermore I have more dropdowns that need to be filtered based on the selection of the other dropdowns. Is something wrong with the SP list? Syntax needs to change? Settings of the columns in SP?

 

selection supplier 1 plant.jpgselection supplier multiple plant.jpg

 

Thanks in advance 😄

  • ACI_Data Profile Picture
    42 on 17 Feb 2021 at 20:22:19
    Re: Sharepoint -> PowerApps: Dropdown filter based on field

    I have no idea what I exactly did (at this point I'm just trying everything), but it worked. The duplicates are gone and the one where options were empty has a list.

     

    The first dropdown was first just text, but I also made it a dropdown. Syntax on property Items is 

    Sort(Distinct('CG soorten lijst',Title),Result)

    Next dropdowns has this syntax  based on title

    Distinct(Filter('CG soorten lijst', Title=ddTitle.Selected.Result), Plant)

    Next dropdown that needs a list based on title and plant

    Distinct(Filter('CG soorten lijst', Title=ddTitle.Selected.Result, Plant=ddPlant.Selected.Result), Type)

    selection supplier 1 plant.jpgselection supplier multiple plant.jpg

     

    @Drrickryp I have spend almost the whole day searching and trial and error. So thank you very much for helping me!

     

    Maybe you have an idea for my next problem. The EditForm you see is based on a second SP list (CG soorten lijst) where all the data is for the dropdowns. Now the first SP list (CG test) is where the data is supposed to be submitted to. Only I don't know how to take the data from this Editform to the first SP list, without the data being submitted into the second SP list. Do you have an idea?

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on 17 Feb 2021 at 19:19:36
    Re: Sharepoint -> PowerApps: Dropdown filter based on field

    @ACI_Data 

     

    Distinct(Filter('CG soorten lijst', Plant=Dropdown2.Selected.Value), Type)

     

    Please do not use SelectedText in your formulas.  It has been deprecated by PowerApps.  Retry your formulas using Selected, not SelectedText because that may be why they don't work.  Also, part of the confusion may be the semantics of the name of your dropdown controls .  Could you rename them consistent with their function like ddPlant, ddType etc. so that I can refer to them by name in my suggestions please?

     

  • ACI_Data Profile Picture
    42 on 17 Feb 2021 at 19:02:41
    Re: Sharepoint -> PowerApps: Dropdown filter based on field

    @Drrickryp First of all thank you so much for taking the time to help me.

     

    I have tried using

    Dropdown1.Selected.Result)

     But PowerApps won't let me do it that way. 

     

    Now I have used this syntax for the first dropdown Plant

    Filter('CG soorten lijst', Title=CardTitle.Text)

     the second dropdown Type I used this syntax

    Filter('CG soorten lijst', Plant=Dropdown2.SelectedText.Value)

     

    Now 2 things. 1) When I select the supplier (Kinofarms) that has multiple products, the list is still empty (except the ones with numbers, even though they are text type in SP).  2) The supplier (Acsa) with 1 product shows duplicates, because I don't use distinct in the syntax. For the customer experience the list is supposed to only show the distinct option. Now I don't know what to do for both problems. Do you have an idea?

     

    selection supplier multiple plant.jpgselection supplier 1 plant.jpg

     

    Thanks in advance

  • ACI_Data Profile Picture
    42 on 17 Feb 2021 at 19:02:19
    Re: Sharepoint -> PowerApps: Dropdown filter based on field

    First of all thank you so much for taking the time to help me.

     

    I have tried using

    Dropdown1.Selected.Result)

     But PowerApps won't let me do it that way. 

     

    Now I have used this syntax for the first dropdown Plant

    Filter('CG soorten lijst', Title=CardTitle.Text)

     the second dropdown Type I used this syntax

    Filter('CG soorten lijst', Plant=Dropdown2.SelectedText.Value)

     

    Now 2 things. 1) When I select the supplier (Kinofarms) that has multiple products, the list is still empty (except the ones with numbers, even though they are text type in SP).  2) The supplier (Acsa) with 1 product shows duplicates, because I don't use distinct in the syntax. For the customer experience the list is supposed to only show the distinct option. Now I don't know what to do for both problems. Do you have an idea?

     

    selection supplier multiple plant.jpgselection supplier 1 plant.jpg

     

    Thanks in advance

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 17 Feb 2021 at 16:05:21
    Re: Sharepoint -> PowerApps: Dropdown filter based on field

    @ACI_Data 

    I am not sure why your formula works.  When you use Distinct(mylist,columnName) it reduces your table to a single column table of unique values and renames the selected columnName to "Result".  To produce  cascading dropdowns, you reference the parent dropdown as Dropdown1.Selected.Result to filter the child dropdown. So if you have Distinct(mylist,Supplier) as the Items property of Dropdown1, then the Items property of Dropdown2 would be 

     

    Filter(mylist,Supplier=Dropdown1.Selected.Result)

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete