cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

Re: Showing contacts from 'gallery'.selected

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
Highlighted
Super User III
Super User III

Re: Showing contacts from 'gallery'.selected

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

Highlighted
Community Support
Community Support

Re: Showing contacts from 'gallery'.selected

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.
Highlighted
Regular Visitor

Re: Showing contacts from 'gallery'.selected

Thanks so much! 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,427)