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 / Displaying Lookup data...
Power Apps
Answered

Displaying Lookup data in a gallery after selecting an item

(0) ShareShare
ReportReport
Posted on by 287

Hello Power Users, I'm struggling a little bit trying to implement this idea in my application.

 

I have 2 SharePoint lists, Courses and Books as shown below.

courses.pngbooks.png

In the courses list I'm using a lookup column that retrieves data from the Books list. Keep in mind that a course can have multiple books so the column has been set to accept multiple values.

 

Now the thing I want to do is that when I open a course item in Power App, I want to display the books of a course in a gallery, where I have also included the book descriptions and the ratings as shown below.

details.png

Any help to achieve this? I managed to do it with labels when my lookup column only accepted a single value with: 

LookUp(Books, ID=Gallery1.Selected.Courses.Id).Title and so on. Now I my lookup column accepts multiple values and I can't find a way to fix my code to display the books in a gallery as shown above.

 

Thank you in advance,

 

Ville

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @VilPel 

    Assuming that you are using a Gallery to display the list of books for the Course, set the Items property of that Gallery to:

       Filter(Books, ID in Gallery1.Selected.Coursed.Id)

     

    Now you will have the data for the gallery and can add labels to the Gallery that display the book information.

     

    I hope this is helpful for you.

  • VilPel Profile Picture
    287 on at

    Huge thanks to you Randy! It works fine now 🙂

  • VilPel Profile Picture
    287 on at

    Hi @RandyHayes, thanks for your help yesterday. I have one follow-up question regarding to this case. Let's say I want to add more books to this related course with a title, description and rating. I'd have a button on the details page that opens a form where you can add a new book to the course as shown below.

    details2.pngform.png

    How do I add this new book directly to the gallery that's displaying on the details page using this form and the submit button? And a bonus question for you, how do I edit and delete items from this gallery with buttons?

     

    Thanks,

     

    Ville

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @VilPel 

    This is not a problem. However you will have to not only Submit the form to create the Book, but then you will need to Update the lookup column in your Course list to include that book.

    As for editing the book...that is going to be something you would do with the edit form as you are only editing the data from the Book list.  So a simple edit and submit would be fine.

    For deleting, you would need to again update the Course lookup column to remove that reference.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard