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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Remove Duplicates from...
Power Apps
Unanswered

Remove Duplicates from Cascading Choice Dropdown

(0) ShareShare
ReportReport
Posted on by 505

I have two drop downs that are in SharePoint as Lookup fields. Using the following formula returns all values in duplicate. 

Choices('DataSource1'.Column)

 

This one is the second dropdown that is connected to the first dropdown.

Filter(Choices('DataSource1'.'Column1'), Value in (Filter('DataSource2',DataCardValue.Selected.Value='Column2').'Column1'))

 

How do I remove the duplicate items from both of these?

Categories:
I have the same question (0)
  • AaronRichardson Profile Picture
    148 on at

    What if you loaded a collection with the distinct list of options and then drive your drop downs with the collection? You could use something like this:

    ClearCollect(
     colDistinctOptions,
     Distinct(
     Choices(SPOList.ChoicesColumn),
     Value
     ).Result
    )

     

    Then you'd use that collection in the Items property for your drop down:

    AaronRichardson_0-1604990882345.png

    So data that looks like this:

    AaronRichardson_1-1604990913014.png

    Looks like this in the drop down:

    AaronRichardson_2-1604990936438.png

    Of course, this is very much simplified, but perhaps this concept will work for you.

  • v-siky-msft Profile Picture
    on at

    Hi @send2mark ,

     

    Are two drop downs  in the EditForm?

    If so, please try to modify the Items property of two dropdown as follows.

    DropDown1. Items property:

    Distinct(Choices('DataSource1'.Column),Value)

    The Update property of corresponding data card:

    LookUp(Choices('DataSource1'.Column), Value=Dropdown1.Selected.Result)
    

     

    Dropdown2.Items property:

    Filter(
    Distinct(Choices('DataSource1'.Column1),Value),
    Result in Filter('DataSource2','Column2' =Dropdown1.Selected.Result).'Column1'
    )

    The Update property of corresponding data card:

    LookUp(Choices('DataSource1'.Column1), Value=Dropdown2.Selected.Result)
    

    Hope this helps.

    Sik

     

     

     

  • send2mark Profile Picture
    505 on at

    What do I substitute Dropdown1 with?

     LookUp(Choices('DataSource1'.Column), Value=Dropdown1.Selected.Result)

  • v-siky-msft Profile Picture
    on at

    Hi @send2mark ,

     

    Dropdown1 refers to the name of first dropdown (combo box, actually), and it's name resembles to DataCardValue1

    Dropdown2 refer to the second dropdown, the cascading one.

     

    Sik

  • send2mark Profile Picture
    505 on at

    Ok that is what I thought. Unfortunately, when I used DataCardValue44 which is the name of mine it returns blank results without any errors. 

  • v-siky-msft Profile Picture
    on at

    Hi @send2mark ,

     

    Please share the details formulas and control information, to help us investigate your issue.

    Which dropdown display blank? Neither of dropdown works?

    Please check the DisplayField property of combbox, it should be ["Result"]

     

    Sik

  • send2mark Profile Picture
    505 on at

    You nailed it with that first one. I switched from Value to Result and it worked. I am now on the second one first part.

     

    send2mark_0-1605146615844.png

     

  • send2mark Profile Picture
    505 on at

    I had the wrong dataCardValue entered. Now I am on the last one and getting no drop down, and I did change it from Value to Result. It isn't the same as the blank drop-down, I just do not get it a drop-down. 

     

    Filter(
    Distinct(Choices('PCE-PA-BO Tracker'.IssueType),Value),
    Result in Filter('Production Continuity Tool Causes','Cause Category'=DataCardValue44.Selected.Result).'Issue Type'
    )

    LookUp(Choices('PCE-PA-BO Tracker'.IssueType), Value=DataCardValue33.Selected.Result)

  • v-siky-msft Profile Picture
    on at

    Hi @send2mark ,

     

    What is the date type of 'Issue Type' and 'Cause Category'

    If they are Choices data type, you have to use 'Issue Type'.Value and 'Cause Category'.Value to reference them

     

    Filter(
    Distinct(Choices('PCE-PA-BO Tracker'.IssueType),Value),
    Result in Filter('Production Continuity Tool Causes','Cause Category'.Value=DataCardValue44.Selected.Result).'Issue Type'.Value
    )

     

    Hope this helps.

    Sik

  • send2mark Profile Picture
    505 on at

    In the list, those are Single line of text, but I tried to add Value just in case and that produces an error saying that it is invalid.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard