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 / Filtering a Gallery wi...
Power Apps
Answered

Filtering a Gallery with a variable in a dropdown

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone,

 

I am working with 2 galleries to drill down into a database:

 

- The first gallery shows the consolidated info by topic and the count of identified gaps.

 

rafaelcosta_0-1643899702625.png

 

- The second drills down into the specific Policy topic and shows the gaps individually.

rafaelcosta_1-1643899951798.png

 

I am able to link both of them via an variable, called VarGaps, which is set on the magnifying button on screen 1 via the code below. 

Set(VarGaps, ThisItem.Policy);
Navigate('GAP Dashboard_1')

 

The goal is for the gallery to be filtered by the VarGaps value but also to allow the user to change via the dropdown menu. The code for the gallery is via a filter where:

Filter(
 Sort(varCol, Requirement_ID),

 (1)VarGaps in Policy_Paper,

 (2)IsBlank(Dropdown_Filter_PolPaper_1.Selected.Policy) Or Dropdown_Filter_PolPaper_1.Selected.Policy in Policy_Paper
)

 

If I use (1), the filter works moving from screens but I can't use the dropdown.

if I use (2), I am able to filter using the dropdown but not to filter with the VarGaps. The Dropdown has on its DefaultSelectedItems

 

{Value: VarGaps}

 and this works to show VarGaps on the dropdown (Orange arrows on image 2).

 

Any idea on how to "update" the gallery to start with the selected Policy from screen 1? 

 

Thanks!

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

    Hi @Anonymous ,

     

    Could you please tell the Items of the Policy Combo box?

     

    The issue is exactly the DefaultSelectedItems of the Combo box, the record {Value: VarGaps} have the column name "Value" than "Policy" so the value seems like have selected but actually not.

     

    Please try below formula instead in DefaultSelectedItems:

    LookUp(ItemsOfComboBox, Policy = VarGap)

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard