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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / selected dropdown valu...
Power Apps
Answered

selected dropdown value limited another dropdown list

(0) ShareShare
ReportReport
Posted on by 180

Hello

I would like to make the following:

I have two dropdown selection datacards which contains the same values.
If a value has been selected from one dropdown window, it should not be selectable in the other one.
Does anyone have a hint? 
The dropdown selections have been defined/created in an SP list... if this matters

 

Thanks in advance
regards

screen shot.jpg
Categories:
I have the same question (0)
  • SkiDK Profile Picture
    1,016 on at

    You could work with collections that ClearCollect() after every change which filters out the selected item.

     

    Ex: you selected item with ID = 2

     

    DD.OnChange :

        ClearCollect(colOptions, DATASOURCE_TABLE);                //Reset collection with all options

        Remove(colOptions, ID = DD.Selected.ID);                        //Remove selected function

     

    Then for the second dropdown you can use as datasource the 'colOptions' which will contain all options but the one from the first dropdown.

     

    And if you want to 'reset' the collection, you can just ClearCollect() with the datasource again. You can also make different collections for the first an second dropdown, where the first dropdown modifies the collection for the second dropdown if the first dropdown needs its own collection.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Unbihexium 

     

    You can directly set the filter on second Combobox inside the datacard as:
     
    Filter(DataSource,!(Value1 in ComboBox1.SelectedItems.Value1))
     
    Here, DataSource needs to be replaced with the actual name of data source and only those values will be displayed which are not selected in Combobox1(usually DataCardsValue10 in data cards) control
     
    Hope this Helps!!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Unbihexium Profile Picture
    180 on at

    Hi yashag2255, Hi SkiDK

    Thanks guys for your quick reply!

    I think the solution from yashag2255 will do it. I will need a bit time to try it out, as I no more in the office. 
    Will update here ASAP

    Thanks again!
    regards

  • Unbihexium Profile Picture
    180 on at

    Hi yashag2255

     

    I've tried with the recommended syntax but I have no luck with that.

    I get an error with this ...  probably I did something wrong

    Error message: Invalid argument type. table values can not be used in this context.
    Filter('Erfassung und Freigabe neuer Artikel 2'.'Prüfung PM / F&E Mängel';!(DataCardValue76.SelectedItems.Value in 'Prüfung PM / F&E in Ordnung_DataCard1'))

    I put that in the "Items" field in Powerapps
    'Erfassung und Freigabe neuer Artikel 2'.'Prüfung PM / F&E Mängel' =  'SharePoint List'.'Column name' which should be filtered 
    DataCardValue76.SelectedItems.Value = the selected dropdown choices from the datacard (Prüfung PM / F&E)

    'Prüfung PM / F&E in Ordnung_DataCard1' = the name of the DataCard where to find DataCardValue76

     

    actually I've tried different ways but I get always an error

    2019-07-16 16_09_43-Alpha_EFNA - Gespeichert (nicht veröffentlicht) - PowerApps.png
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Unbihexium 

     

    That might be happening because you have incorrectly placed the attributes inside the formula, your formula should be:
     
    Filter('Erfassung und Freigabe neuer Artikel 2'; !('Prüfung PM / F&E Mängel' in DataCardValue76.SelectedItems.Value)).'Prüfung PM / F&E Mängel'
     
    Please make sure Value is the correct Column Name referred in SelectedItems of the First ComboBox. This can be verified by the selecting the values inside the suggestions that PowerApps provide.
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    HI @Unbihexium ,

    Are the "Prufung PM / F&E in Ordung" column and "Prufung PM / F&E Mangel" column both Choice type column in your SP List with same available options?

     

    Based on the needs that you mentioned, I think Filter function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

    Set the Items property of the "Prufung PM / F&E in Ordung" ComboBox to following:

    Choices('Erfassung und Freigabe neuer Artikel 2'.'Prufung PM / F&E in Ordung')

    Set the Items property of the "Prufung PM / F&E Mangel" ComboBox to following:

    Filter(
    Choices('Erfassung und Freigabe neuer Artikel 2'.'Prufung PM / F&E Mangel'),
    Value <> DataCardValue76.Selected.Value
    )

    Note: The DataCardValue76 represents the "Prufung PM / F&E in Ordung" ComboBox within your Edit form. I assume that the "Prufung PM / F&E in Ordung" and "Prufung PM / F&E Mangel" ComboBox are both single selection.

    If "Prufung PM / F&E in Ordung" and "Prufung PM / F&E Mangel" ComboBox are multiple Choice selections box, please modify above formula as below:

    Set the Items property of the "Prufung PM / F&E Mangel" ComboBox to following:

    Filter(
    Choices('Erfassung und Freigabe neuer Artikel 2'.'Prufung PM / F&E Mangel'),
    Not(Value in DataCardValue76.SelectedItems.Value)
    )

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • Verified answer
    Unbihexium Profile Picture
    180 on at

    Hi Kris

    Awesome!! This works as hoped!

     

    Filter(
    Choices('Erfassung und Freigabe neuer Artikel 2'.'Prüfung PM / F&E Mangel');
    !(Value in DataCardValue76.SelectedItems.Value)
    )

     

    Yup, "Prüfung PM / F&E in Ordnung" column and "Prüfung PM / F&E Mängel" column are both multiple Choice selections boxes with identical values (choices)

    I think I understand now the whole magic.

    today is a good day!
    thousand Thanks Kris Dai

    @yashag2255 Thank you for your help, unfortunately it didn't work but I get the filter logic now!

    Best regards

    17-07-2019 08-50-58.jpg

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard