web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Opening a PDF on a new...
Power Apps
Unanswered

Opening a PDF on a new Tab by clicking an icon in a gallery

(0) ShareShare
ReportReport
Posted on by 11

Hi, 

 

I'm having trouble opening my PDF from an onselect of an Icon. The PDF is linked to my sharepoint library. I currently am using the below in the OnSelect for the icon, but it doesn't open anything up. I'm assuming it isn't linking correctly, but not sure where it is wrong. 

 

'Document #' is the column in Invoices that should match to Thisitem.Field_19, which is from another sharepoint data page called Detailed Line Items. The icon is within a gallery that is linked to Detailed Line Items data page. Any suggestions or help is appreciated! 

 

ForAll(

    Filter(

        Invoices,

        StartsWith(

            'Document #',

            ThisItem.Field_19

        )

    ),

    Launch(

        ThisRecord.'Link to item',

        {q: "Power Apps"},

        LaunchTarget.New

    )

)

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,075 Most Valuable Professional on at

    Hi @sphinxley ,

    I cannot see your data or model here, but you can only launch one document, so you need to return a Record, not a Table - the below is structure guidance only.

    With(
     {
     wDoc:
     LookUp(
     Invoices,
     StartsWith(
     'Document #',
     ThisItem.Field_19
     )
     )
     },
     Launch(
     wDoc.'Link to item',
     {q: "Power Apps"},
     LaunchTarget.New
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • sphinxley Profile Picture
    11 on at

    Hi, 

     

    Sorry pretty new to PowerApps. Which part is referencing to the table that should be changed to a record? 

  • WarrenBelz Profile Picture
    153,075 Most Valuable Professional on at

    Hi @sphinxley ,

    You need LookUp, not Filter.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • sphinxley Profile Picture
    11 on at

    When I changed it to lookup, I'm still not able to open any PDFs. 


    Is there a way to check if it's actually looking anything up? Or if it's correctly looking it up? 

  • WarrenBelz Profile Picture
    153,075 Most Valuable Professional on at

    Hi @sphinxley ,

    Put this on a Label and see if you get the Document Name

    LookUp(
     Invoices,
     StartsWith(
     'Document #',
     ThisItem.Field_19
     )
    ).Name

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard