cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
peter5164
New Member

How to lookup related data

My brain must be wasting away. This should be simple but I can't work it out.

 

I have a list of volunteers (Volunteers table) that appears and when I click on one I can see their complete details. I'm trying to have a button where it takes me to a list of their completed training and a SP table called 'training'. So what I have tried is opening a screen with a filter on the 'on visible' that chooses only the training for that person. 

 

The filter is Filter(training, Training.VolID = ?) and there I draw a blank! Can anyone help me?

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Super User
Super User

@peter5164 Assuming that you have a Gallery of volunteers in Screen 1, in the OnSelect of the Gallery set a global variable, Set(gblSelectedVolunteer, yourGallery.Selected)

Then in the Gallery of training Screen 2, in the Items property,

 Filter(training, Training.VolID = gblSelectedVolunteer.ID)

 

* Remember to replace, control and column names as applicable

View solution in original post

3 REPLIES 3
CNT
Super User
Super User

@peter5164 Assuming that you have a Gallery of volunteers in Screen 1, in the OnSelect of the Gallery set a global variable, Set(gblSelectedVolunteer, yourGallery.Selected)

Then in the Gallery of training Screen 2, in the Items property,

 Filter(training, Training.VolID = gblSelectedVolunteer.ID)

 

* Remember to replace, control and column names as applicable

peter5164
New Member

Actually the solution was a little more tricky than that although you did put me on the right track.

Screen 1 - A  gallery list

Screen 2 - An individual's details

Screen 3 - The training an individual had done

The problem which you highlighted for me was that I had been trying to Set a Variable when moving from screen 2 to screen 3. When I set the variable on the first screen (before moving to screen 2) it was a simple matter.

Thank You!

@peter5164 

Glad it help!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,004)