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 / Gallery with attachmen...
Power Apps
Answered

Gallery with attachments (SP item) in selected items from other gallery

(1) ShareShare
ReportReport
Posted on by 943 Season of Giving Solutions 2025
Hi!
 
I have multiple comboboxes that filters items in a gallery from SP list. So when they are selected, the options are visible on a gallery in one screen. just likes this:
When clicking in the PDF icon, i want to navigate to other screen with 1 gallery and a pdf visor, the thing is I dont really know how to make that second gallery from the attachments in the item selected in the first gallery:
How should I do in the second gallery in the other screen to be able to see the multiples attachments of the item selected in the other screen? Is it possible? Then in the PDF visor, show the PDF selected from that gallery. 
In case it's not a PDF, open it in browser or whatever.
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
     
    Screen 1
     
    └─ Gallery (filtered by ComboBoxes)
     
    └─ PDF Icon → Navigate and pass the item of the selected item
     
    Navigate(
        scrAttachments,
        ScreenTransition.Fade,
        {
            varSelectedItem: ThisItem
        }
    )
     
    Screen 2

    ├─ GalleryAttachments (Items = varSelectedItem.Attachments)
     
    ├─ PDF Viewer (PDF only)
     
    If(
        EndsWith(Lower(varSelectedAttachment.Name), ".pdf"),
        varSelectedAttachment.Value,
        Blank()
    )

     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • Charlie Martharper Profile Picture
    943 Season of Giving Solutions 2025 on at
    Hi! @MS.Ragavendar
     
    In my case, screen one has the gallery (1) and outside of it a container (2) with the information + icon, so when writing that control it doesn't get it ThisItem. What scrAttacments does?
    Should I need to write anywhere the name of the other screen?
     
  • MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
     
    Navigate(
        scrAttachments,
        ScreenTransition.Fade,
        {
            varSelectedItem: Gallery1.Selected
        }
    )
    On Screen 2 (scrAttachments):
    Items Property
    varSelectedItem.Attachments
  • Charlie Martharper Profile Picture
    943 Season of Giving Solutions 2025 on at
    Screen 1:
    Screen 2:
    The pdf visor has this Document =
    Last(Gallery4_1.Selected.Attachments).Value
    :
    But it could be more than 1 PDF in the gallery (gallery2), so I want this screen with a gallery on the left with the attachments from the item selected in gallery1.
    Any help? Maybe you know what I am missing@Kalathiya
  • Verified answer
    MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
     
     
    Navigate(
        scrAttachments, // Provide your screen name which you wants to navigate
        ScreenTransition.Fade,
        {
            varSelectedItem: Gallery1.Selected
        }
    )
     
  • Charlie Martharper Profile Picture
    943 Season of Giving Solutions 2025 on at
    Ok the first part is done, now in screen 2, the gallery is not getting any attachment:
    It doesnt get any text, how can I get the title of the PDF (attachment) there.
    Thank you so much.
  • Suggested answer
    Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
     
    Your parent Gallery On select code: 
    Navigate(
        Screen3, //Replace with your screen name
        ScreenTransition.Fade,
        {
            varSelectedItem: ThisItem
        }
    )
    Screen 2: Gallery Item Property
    varSelectedItem.Attachments
    Set gallery Label: ThisItem.DisplayName
    - It will show the attachment name
     
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
     
     
     
  • Charlie Martharper Profile Picture
    943 Season of Giving Solutions 2025 on at
     
    It work if I do that (appear all the attachments of the item in the first gallery), but the thing is I dont want to navigate when clicking in the gallery item, because first they need to see the information of it (right container of the 1st gallery screen). I want to navigate to the attachments screen when the item has attachments then an icon appears and when clicking that icon, go to the other screen with the multiple attachments of the item selected.
     
    Its important that they first see all the information of that item in the gallery, then if they need to go see the attachments of it, click the icon and navigate to the attachments screen. 
     
    This is the icon OnSelect: 
     
    Navigate(
        Screen1, // Provide your screen name which you wants to navigate
        ScreenTransition.Fade,
        {
            varSelectedItem: Gallery1.Selected
        }
    )
    The attachments screen doesnt get the attachments part
    In the PDF visor I have this:
    Gallery1.Selected.Value
     
    So I get the PDF of the gallery attachments screen. Now I would like to download and print from 2 icons in the gallery:
     
    As you can see I get the display name of the files right, but I would like to come here from the icon of the attachments of the other screen, not when clicking in the item of the first gallery.
     
    Thanks for your time!!
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at

    In that case you can implement like this in attachment screen. 
     
    LookUp(YourListName,ID=varSelectedItem.ID).Attachments
    
    //YourListName - Replace with your SharePoint list name - Where from you want to show the attachments. 
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
  • Charlie Martharper Profile Picture
    943 Season of Giving Solutions 2025 on at
    Ok that gets the files too in the attachment screen gallery but what should I change then in the first gallery so it doesnt navigate? If I delete the: 
    Navigate(
        Screen1, //Replace with your screen name
        ScreenTransition.Fade,
        {
            varSelectedItem: ThisItem
        }
    )
    and change it to false, it doesn't get the item so the attachments doesnt appear.
    Now I have in the items gallery of the attachments screen: 
    LookUp('Cartera proves diagnostiques 2026_final',ID=varSelectedItem.ID).Attachments
    So I would like to get the items attachment from the first gallery selected item but without navigating to the attachments screen (screen1)

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard