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 / PDF Viewer with a crit...
Power Apps
Answered

PDF Viewer with a criteria

(0) ShareShare
ReportReport
Posted on by 16

Hi all, I have a flow to show a PDF file in the PDF Viewer control and updating context to run the flow from a gallery, so my parameter is the Selectd."Name and Extension", runs fine

pdf.png

The problem is I want to display a PDF based on an INVOICE NUMBER in the document list. I´m running out of ideas, anyone have one or point me to the right direction?

 

Thanks

Categories:
  • WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    Hi @jlivio ,

    Assuming your have the Invoice number in the metadata of the library, the design of an app I have may assist.

    I have a gallery based on a Library (yours could be filtering the Library on the Invoice number) and I display a Thumbnail of the document in this

    ThisItem.'Thumbnail ({Thumbnail})'.Large

     

    PDFManuals.png

    The top icon then launches the document in the viewer.
    Firstly varSite is simply the base site address then this

    Set(
     ViewPDF,
     PDFView.Run(
     varSite,
     "/" & ThisItem.'Folder path' & ThisItem.'File name with extension' 
     )
    )

    the Document of the view is

    varPDF.pdf

    and the Flow is simply this

     

    PDFFlow.png

    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.

  • WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    Hi @jlivio ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

  • jlivio Profile Picture
    16 on at

    HI, Thanks, but the list don't have the data source for the document library, only a Invoice ID and an ID, so it must be done in the Flow side, any clues?

     

    Thanks

  • WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    Hi @jlivio ,

    I have not tried this, but you could use "Get file content" instead of using the path and filter for the Invoice number in the relevant metadata field

     

    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.

     

  • WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    Hi @jlivio ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

  • jlivio Profile Picture
    16 on at

    Hi, Thanks, the problem is this:

     

    LIST 1

    Document List

    FileReaf

    InvoiceID

    LIST 2

    InvoiceID

    Generic List

    PROBLEM

    Display the document in a PDFViwer Control by using the InvoiceID in the context of LIST 2, the Data Source available is LIST 2, so you don´t have the document available from LIST 1, It means you only can do this in a FLOW filtering this InvoiceID to give you the right PDF File from LIST 1.

     

    Looks easy but it's NOT.

  • Verified answer
    WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    Hi @jlivio ,

    If you have the item you want in a gallery as I mentioned below, (but simply Filtered on InvoiceID) you can open it).
    You could also do a Lookup

    With(
     {
     wFile:
     LookUp(
     YourLibrary,
     Invoice = ThisItem.InvoiceID
     )
     },
     Set(
     ViewPDF,
     PDFView.Run(
     varSite,
     "/" & wFile.'Folder path' & wFile.'File name with extension'
     )
    ) 

     

    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.

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 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard