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
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
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,
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'
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
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
Hi @Unbihexium
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.
WarrenBelz
146,522
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,890
Most Valuable Professional