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 / Displaying specific sh...
Power Apps
Answered

Displaying specific sharepoint items in a gallery

(0) ShareShare
ReportReport
Posted on by 59

I am currently in the middle of creating a powerapp where users go in and choose options from a drop down, based on these options a gallery will bring back specific items from a sharepoint list.

 

I have done something like this before however it was using items from a collection so it was bringing back info based on what was saved in the collection. I've also done something similar with when a user enters their email then all the items they have submitted to sharepoint will appear in the gallery, however i can't seem to replicate this using drop downs.

 

Below is the code I am attempting to use on the gallery, for now it should basically be, whatever the user selects in "FatalRisks1 dropdown" if it is equal to the "FatalRisks" column in sharepoint, display this item in the gallery. I should also mention that the Fatal Risks drop down is also being populated by the same column, the sharepoint list is being populated by a microsoft Form.

 

Any help would be appreciated, here is the code i have been trying:

 

Sort(Filter(TheBigConversation, FatalRisk1 = FatalRisks && FatalRisk2 = FatalRisks2,Created,Descending))

 

Sort(Filter(TheBigConversation, FatalRisk1 = FatalRisks.Value,Created,Descending))

Devinm501_0-1603280964597.png

 

 

 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Devinm501 
    Here's how I would accomplish the task.

    Sort(Filter(TheBigConversation, FatalRisks = FatalRisk1.Selected.Value), Created, Descending)

     


    To FILTER a SharePoint list by multiple selections do this. 

     

    Sort(
     Filter(TheBigConversation,
     FatalRisks = FatalRisk1.Selected.Value,
     Or FatalRisks = FatalRisk2.Selected.Value,
     Or FatalRisks = FatalRisk3.Selected.Value,
     ),
     Created, Descending
    )

     

     

    And if you want to see an example of how to filter a list with multiple dropdowns I've linked to an article below.

     


    Link to Article 'Filter Gallery With Multiple Dropdowns'

    https://matthewdevaney.com/power-apps-filter-gallery-with-multiple-dropdowns

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Devinm501 Profile Picture
    59 on at

    Thank you for the quick response,

     

    I have tried both snippets and am getting "Invalid Argument" on my "=" in the code. Do you know what could cause this?

     

    Thanks again.

     

    Devin

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Devinm501 ,

    Do you want to filter items based on three drop downs?
    Could you tell me:

    1)the fields in your sharepoint list? whether do you have fields named FatalRisk1,FatalRisk2,FatalRisk3 or only have one field named FatalRisks? this field data type?  If it is choice type, whether it allows multiple selections?

    2)whether these three drop downs named FatalRisk1, FatalRisk2, FatalRisk3?

    3)the formulas in the three drop downs' Items?

    4)the relationship between these three drop downs? 

    I assume that:
    the field is named FatalRisks in sharepoint list, this field data type is choice type(not allow multiple selections) , the drop downs named FatalRisk1, FatalRisk2, FatalRisk3,relationship between them is OR .

     

    If so, you could set like this:

    drop down1,drop down2, drop down3 's Items:

    Choices(TheBigConversation.FatalRisks)

    gallery's Items:

    Sort(
     Filter(TheBigConversation, FatalRisk1.Selected.Value = FatalRisks.Value||
     FatalRisk2.Selected.Value = FatalRisks.Value||
     FatalRisk3.Selected.Value = FatalRisks.Value
     ), 
    Created,Descending)

     

     

    Best regards,

     

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

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard