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 / Get currently selected...
Power Apps
Answered

Get currently selected items from a ComboBox

(0) ShareShare
ReportReport
Posted on by 377

Hi

I have two lists in SharePoint Online.

Companies and Articles.

There can be numerous Articles about a Company.

In the Articles list there is a Lookup to the Company List value "Title".

 

I am trying to filter the Articles Gallery by Company.

 

I created a Combo Box "cbFilterByCompany" with

DefaultSelectedItem = Choices(Articles.CompanyTitle)

And a Label with

Concat(cbFilterByCompany.SelectedItems, "CompanyTitle", ",")

 

But it just shows the text "CompanyTitle,CompanyTitle,CompanyTitle,CompanyTitle,CompanyTitle"

Also the Combo Box isn't displaying the names of the Companies (and it seems to be trying to show the names of comanies multiple times as there can be multiple articles about the same company)

 

thanks

P

 

 

Categories:
I have the same question (0)
  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @pmwhelan 

     

    Remove the quotes on the CompanyTitle.

     

    Concat(cbFilterByCompany.SelectedItems, CompanyTitle, ",")
  • pmwhelan Profile Picture
    377 on at

    Many thanks.

     

    Do you know how I'd filter the items in the gallery?

     

    I try

     

    Filter(Articles, CompanyTitle.Value in cbFilterByCompany.SelectedItems)

    but it says expected a one-column table.

     

    Thanks

     

  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @pmwhelan 

     

    Filter(Articles, CompanyTitle.Value in ShowColumns(cbFilterByCompany.SelectedItems),Title))

     

    Replace Title with the actual name of the column.

  • pmwhelan Profile Picture
    377 on at

    "Invalid number of arguments. expected 2 or more"

  • pmwhelan Profile Picture
    377 on at

    I try this ...

     

    Filter(Articles, CompanyTitle.Value in cbFilterByCompany.SelectedItems.CompanyTitle)

     

    CompanyTitle isnt recognised.

  • cha_cha Profile Picture
    4,932 Moderator on at
    Filter(Articles, CompanyTitle.Value in ShowColumns(cbFilterByCompany.SelectedItems,Title))

    Try that, I added extra parenthesis earlier.

  • pmwhelan Profile Picture
    377 on at

    The Function ShowColumns has some invalid arguments.

  • cha_cha Profile Picture
    4,932 Moderator on at

    What's the name of the column of your company title?

  • pmwhelan Profile Picture
    377 on at

    In the Articles List I have a CompanyTitle column (which is a lookup to the Company list - it can also be multiselect)

    thanks

  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @pmwhelan 

     

    So sorry about my answer. I misunderstood your question

     

    First, on your ComboBox, do this to show the company. You don't need to make code changes. Just change the Data Source to the Company list and set Primary Text as Title

    cha_cha_0-1670243299417.png

     

     

    Then for your Gallery, use this:

    Filter(
    	Articles,
    	CompanyTitle.Value in
    	ShowColumns(ComboBox1.SelectedItems,"Title")
    )

    cha_cha_1-1670244208287.png

     

    If you notice you will have a delegation warning, the yellow warning sign. Will send a follow about it soon.

     


      ✔️
    Just in case my response helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

     

      🔗
    🕸bistek.space  🐦 @cha_bistek  📺 @BisTekSpace 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard