cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nico_FE
Regular Visitor

Showing contacts from 'gallery'.selected

Hi,

 

I have two data sets 'Companies' & 'Contacts' and I have created a gallery for each. 

 

Currently the 'CompaniesGallery' is showing all companies A-Z, and I have a seperate screen that is navigated to using Navigate(CompaniesDetailScreen, ScreenTransition.None) .

 

On this screen I have various company details but I would also like to include another gallery on this page showing only the contacts that work for the selected company.

 

Any assistance would be greatly appreciated!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

On the New Gallery Called ContactGallery it put on the Items:

I assume there a common field between company datasouce and Contact Datasource. Ihave used ContactID to represent this common field. You can change it if it is another field

 

Then filter the ContactGallery as follows:

Filter(ContactDatasource,ContactID=CompaniesGallery.Selected.ContactID

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

3 REPLIES 3
eka24
Super User III
Super User III

On the New Gallery Called ContactGallery it put on the Items:

I assume there a common field between company datasouce and Contact Datasource. Ihave used ContactID to represent this common field. You can change it if it is another field

 

Then filter the ContactGallery as follows:

Filter(ContactDatasource,ContactID=CompaniesGallery.Selected.ContactID

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @Nico_FE ,

Could you please share a bit more about your data source? Are they both SP lists or CDS Entities?

Is there some relationship set up between the 'Companies' and  'Contacts'?

 

Based on the needs that you mentioned, I think PowerApps could achieve your needs. I assume that the 'Companies' & 'Contacts' are both CDS Entities, the 'Companies' Entity has a One-to-Many relationship with the 'Contacts' Entity.

 

I have made a test on my side, please consider take a try with the following workaround:

Add a another Gallery within your CompaniesDetailScreen, set the Items property of the Gallery to following:

Filter(
       Contacts,
       Companies.'Company Name' = CompaniesGallery.Selected.'Company Name'
)

Note: The 'Companies' represents the LookUp type column in your Contacts Entity, which reference values from your Companies Entity. Please make sure there is a relationship set up already between 'Companies' and  'Contacts' Entity, then you could filter related contacts based on selected company against the relationship (e.g. LookUp type column), otherwise, you could not achieve your needs in canvas app

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Nico_FE
Regular Visitor

Thanks so much! 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,066)