cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Purrple
Frequent Visitor

2 separate galleries need to navigate to the same form

I am fairly new to powerapps so I apologize if this is a basic question.

 

I have 2 separate galleries.

EventListGallery, which displays a list of events

EventLinkGallery, which is built into a calendar grid that populates a button within it when there is an event on that day (connected to EventListGallery details)

 

I want users to be able to navigate to another screen (EventDetails) with a form on it (FormView1) that displays indepth details about the event so they can register for it.

 

I am not having any issues having the EventListGallery display on the form (Item - EventListGallery.Selected), but having it also being able to accept a function on the button so that users can use either the EventListGallery OR the EventLinkGallery button to get to the same form.

 

What am I missing?

 

I hope this makes sense to all of you and thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Purrple 

So then assuming that both galleries have the same record structure (you are not data shaping in your Items property), then set your OnSelect in them to:  Set(glbCurrentRecord, ThisItem)

Then set your form Item property to: glbCurrentRecord

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

8 REPLIES 8
RandyHayes
Super User
Super User

@Purrple 

As long as you are only using records for the datasource for your form (not different datasources), then the Form would be capable of doing what you need.

The trick will be to make sure the Item property of your form is getting the record that you want based on the selection from the two different galleries.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

How would I update the item property to do that?

RandyHayes
Super User
Super User

@Purrple 

Depends!  What is your Item property currently, and how are you accounting for (or trying to) the two galleries?  

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Currently, the form just uses a simple EventListGallery.selected to populate the details from the List gallery. Sorry for sounding confused but I don't know how to get the second control in there.

 

The link gallery has a button inserted into it where the button appears on all dates where there is an event using a filter from the initial list. The button can of course navigate to the details screen, but what I really don't understand is how to take the title of that button and use that to get the right form details as an alternative to filtering it by the text list.

 

Hope that clarifies.

Thank you!

RandyHayes
Super User
Super User

@Purrple 

So to be clear though - BOTH galleries are deriving their records from the same datasource? What is your datasource?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

My datasource is a Sharepoint list called 'Event List'

RandyHayes
Super User
Super User

@Purrple 

So then assuming that both galleries have the same record structure (you are not data shaping in your Items property), then set your OnSelect in them to:  Set(glbCurrentRecord, ThisItem)

Then set your form Item property to: glbCurrentRecord

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Purrple
Frequent Visitor

This worked perfectly and I could not wrap my head around it - appreciate your help. Thank you!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,068)