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 items in the g...
Power Apps
Answered

Display items in the gallery based on the dropdown list selection

(0) ShareShare
ReportReport
Posted on by 90

Hello, 

 

How can I display items in the gallery based on the dropdown list selection which is in a form that is filled in form1 in screen1 by user1. User2 will click at a button above the gallery to choose a specific category. The items displayed in the gallery should be based on the button that has been selected.(The buttons are used here to serve is filters for the gallery). By clicking on the button , certain items will be displayed in the gallery and those items all have a thing in common which is that the selection of the dropdown list in form 1 (the value of a specific field of that item) is the same.
 
Thanks in advance ! 🙂
Categories:
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @Rag23 

     

    One way to achieve this is to use a global variable to store the value of the dropdown list in screen1, and then use it in the filter formula for the gallery in screen2.

    For example, you can set the OnChange property of the dropdown list to something like this:

    Set(DropDownValue, Dropdown1.Selected.Value)

    This will assign the selected value of the dropdown list to the variable DropDownValue. Then, in screen2, you can set the Items property of the gallery to something like this:

    Filter(DataSource, Category = DropDownValue && ButtonFilter = Button1.Text)

    This will filter the data source based on the value of the variable DropDownValue and the text of the button that is clicked. You can use different buttons with different texts to filter by different criteria. For example, if you have buttons with texts “A”, “B”, and “C”, you can filter by those values using the same formula.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Rag23 Profile Picture
    90 on at

    Thanks for the reply!

    What should I put instead of ButtonFilter. Also, where exactly should I put the text that I am trying to filter by. Like "A", "B",  "C" ?

     

    Thanks again.

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @Rag23,

    Do you want to filter Gallery based on User1 dropdown selected in form1 and clicking a button?

    Could you please tell me if the field correcponding to the dropdown selection is a Choice type or Text type?

     

    You have some category buttons as below, right?

    vqiaqimsft_0-1696816442936.png

    If you have category buttons as below and you have a Choice field correcponding to the dropdown selection, please try the following steps:

    1). set the OnSelect property of each A,B,C button represently as below:

    Set(varCategory,Self.Text)

    2). set the Gallery Items property as below:

    Filter(DataSource, Category = varCategory&& SelectionField.Value=dropdown.Selected.Value)

     

    If you have category buttons as below and you have a Text field correcponding to the dropdown selection, you just need to modify the step2 formula as below:

    Filter(DataSource, Category = varCategory&& SelectionField=dropdown.Selected.SelectionField)​

    Note the paramter after the Selected depends on column name returned by the formula you set for the Items property of the dropdown control, if it returns Value, please refer to Value, if it returs a special column name, refer to the special column name

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard