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 / Using the Combobox sel...
Power Apps
Answered

Using the Combobox selectedItems as text for other lists

(0) ShareShare
ReportReport
Posted on by 15

Hello, 

 

This is quite the beginner's question, but I would just like to use the SelectedItem in my ComboBox (maybe extract it?) so that I can use it to power "Distinct" searches in other DropDown lists. 

 

Specifically, I am trying to reference the SelectedItem in this formula : 

 

Sort(Distinct(Filter("List1", Name2=COMBO.SELECTED.FIELD),Name1),Result)

 

Thank you and I will be glad to offer more details if need be! 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @doironjp 

    SelectedItems is just a property that contains a table of records that match the Items property of the control and have been selected.

    What is it that you want to use the in regard to Distinct?

  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on at

    hi @doironjp the combobox has a field that's mapped to it. a label can refer to that field such as yourComboBox.Selected.Field such as yourComboBox.Selected.Value this will display the selected items field/column Value.

     

    It becomes a bit more tricky with multiple selected items

     

    Hope it helps

    R

  • doironjp Profile Picture
    15 on at

    Hello! Thanks a lot for the fast answers. 

     

    I am trying to reference the SelectedItem in this formula : 

     

    Sort(Distinct(Filter("List1", Name2=COMBO.SELECTED.FIELD),Name1),Result)

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @doironjp 

    Your syntax is wrong.  Are you using a language that needs your parameters to be separated by a comma or a semicolon?

     

    Should be either:

       Sort(Distinct(Filter(List1, Name2=COMBO.Selected.FIELD), Name1), Result)

    Or

       Sort(Distinct(Filter(List1; Name2=COMBO.Selected.FIELD); Name1); Result)

     

    Note, the above formulas will only provide filtering on ONE item.  If you want to filter on multiple selections, then:

       Sort(Distinct(Filter(List1, Name2 in COMBO.SelectedItems.FIELD), Name1), Result)

  • doironjp Profile Picture
    15 on at

    You are right my syntax was all messed up since I'm using the French version and was trying to "translate" it sorry. 

     

    I have tryed the following but it doesn't seem to yield any result :

     

       Sort(Distinct(Filter(List1; Name2=COMBO.Selected.FIELD); Name1); Result)

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @doironjp 

    Okay...semicolons it is then.

     

    What is the Items property of your combobox?

  • Verified answer
    doironjp Profile Picture
    15 on at

    Thanks to all your answers I found out how to make it work : 

     

    Sort(Distinct(Filter('List1'; Nom2=COMBO.Selected.Name2); Name1); 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

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard