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 / Filter Gallery by drop...
Power Apps
Answered

Filter Gallery by dropdown value cross multiple entities

(0) ShareShare
ReportReport
Posted on by 6

Hi,

 

I'm building my first PowerApp to automate the invitation process to our portal, and i want to achieve the following: 

Based on the account (entity 1) selected in a dropdown, the gallery should then filter out all contacts (entity 2) that has a value in a specific field (entity 3).

pontusspringer_0-1595408183163.png pontusspringer_1-1595408242275.png

 

So basically, when the account is selected, the code should filter on all contacts within that company that has a record in the Web Role section of the customer card. 
Note: Web Role is not a normal field in Customer Engagement. It's more like a table.

pontusspringer_2-1595408455354.png

pontusspringer_3-1595409145632.png

 


Hope someone has an idea and thanks in advance
//Pontus

Categories:
  • Florian_Kleinz Profile Picture
    227 on at

    Hello,

     

    it is hard to help with having this Little Information about your data structure.

     

    But for my understanding FILTER and COUNTROWS should do the Job.

     

    FILTER(employees, account = Dropdown.Selected) or maybe Dropdown.Selected.Text

    This delivers a table filtered by your Dropdown value.

    If you want to have the number of rows for this table just wrap it with Countrows

    COUNTROWS(FILTER(employees, account = Dropdown.Selected) )

     

    Best regards

    Florian

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

     

    Hi @pontusspringer ,

     

    Do you mean you want to filter the Contact entity by selected account and assigned WebRole, right?

    I have tried, but can't find a clear way to apply a logic in filter function to check if web role is assigned to contact.

    What I can achieve is to create a ReferenceGallery, filtered by selected account.

     

    ReferenceGallery.Items: Filter(Contacts,'Company Name'=Dropdown1.Selected)

     

    Inside the Reference Gallery, there is a Label to display the assigned WebRole by setting Text property to 

     

    Concat(ThisItem.'Web Roles',Name)

     

    Then Set the Items of your target gallery as follows to filter on ReferenceGallery by checking wether the Label is blank.

     

    Filter(ReferenceGallery.AllItems,!IsBlank(Label1.Text))

     

    Then the target gallery will show as you expected. in addition, try to set the Visible of ReferenceGallery to false to hide it.

    Snipaste_2020-07-23_11-22-36.png

    Hope this helps.

    Sik

  • Pontus Leppaniemi Springer Profile Picture
    6 on at

    Thank you so much, it did the trick!

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard