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 / Display Collection in ...
Power Apps
Answered

Display Collection in Gallery

(0) ShareShare
ReportReport
Posted on by 215

Hello!
I have combobox [ComboBox1_1] and the item properties is 
Distinct(SourceName,CollectionName)
but in the Gallery how do I modify the filter function?

lunalovegood_0-1697767596863.png

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @lunalovegood ,

     

    Could you please post the formula in Text? So I can modify it more easily rather than hand typing words by words.

     

    Best regards,

  • lunalovegood Profile Picture
    215 on at

    Here you go

    Filter(
     [@'HEO Lesson Learn'],
     IsBlank(ComboBox1.SelectedItems) || IsEmpty(ComboBox1.SelectedItems) || 'Action Party' in ComboBox1.SelectedItems.Value,
     IsBlank(ComboBox.SelectedItems) || IsEmpty(ComboBox.SelectedItems) || 'Project Name'in ComboBox.SelectedItems.Value,
     IsBlank(ComboBox1_1.SelectedItems) || IsEmpty(ComboBox1_1.SelectedItems) || LLCollect in ComboBox1_1.SelectedItems.Value
     
    )
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @lunalovegood ,

     

    What is the LLCollect collection? In addition, The formula Distinct(SourceName,CollectionName) makes no sense, and it should be Distinct(SourceName,CollumnName)

     

    Best regards,

  • lunalovegood Profile Picture
    215 on at

    my intention was to enable the search function in combobox to search all across column in my list, thus i created the collection based on my list [to grouped all my columns in the collection], so when user enter search term in combobox , the application will be able to display result that is based on all columns in my list . 

    for example 
    user insert "Planning Schedule Delay" then the application can display rows that is related to the inserted search term

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @lunalovegood ,

     

    This is not possible in PowerApps, column names in Filter function should be static texts. To explain it more specifically, if you need to filter on dynamic columns, you will have to use formula as follows:

    Switch(
     SearchColumnNameVariable,
     "Column1"
     Filter(DataSource, Column1 = "abc"),
     "Column2"
     Filter(DataSource, Column2 = "abc"),
     "Column3"
     Filter(DataSource, Column3 = "abc"),
     ...
    )

    You can not use dynamic column name as below:

    Filter(DataSource, ColumnNameVariable = "abc"),
    

     

    Best regards,

  • lunalovegood Profile Picture
    215 on at

    thank you @v-jefferni ,i completely understood

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard