cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jlivio
Regular Visitor

PDF Viewer with a criteria

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

7 REPLIES 7
WarrenBelz
Super User III
Super User III

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
Super User III
Super User III

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.

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

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
Super User III
Super User III

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.

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.

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.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (57,966)