cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Display specific list item PDF attachment in PDF viewer

Hello,

 

I have a SharePoint list and have included the PDF viewer control in my Power App.

 

I have a flow where emails are added to SharePoint lists however due to SharePoint not accepting embedded images in the emails I am using a connector to export the email to PDF to include images which is working correctlly and adding a PDF to the list item containing the email body - this is the PDF I want to specifically display on form load.

 

To make things easier I have prefixed these items with some text and the list ID number before the file name:

 

CXP-ID-FileName.PDF

 

Therefore, can I display this specific PDF when a PDF exists with for example: CXP-45- at the beginning of the file name?

 

I was following this guidance on how to get PDF's to display:

 

https://www.c-sharpcorner.com/article/using-pdf-viewer-in-power-apps-form/

3 REPLIES 3
Highlighted
Dual Super User III
Dual Super User III

Re: Display specific list item PDF attachment in PDF viewer

There are two challenges for you.

 

1) PDFs stored in SharePoint can't be viewed directly because the PDF viewer won't work with sources that require authentication.  The article you cited explains how to get around that with Power Automate.

2) You only want to display the PDF if it starts with a particular prefix.  So you'll have to use an IF statement to decide when to call the flow to preview the document.

 

Both of those should be possible.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Helper V
Helper V

Re: Display specific list item PDF attachment in PDF viewer

Any pointers on how to design that would be helpful 🙂

Highlighted
Dual Super User III
Dual Super User III

Re: Display specific list item PDF attachment in PDF viewer

1) the article already provides a pretty straightforward description.

2) I would create a button to do the preview and set its onselect to run the flow using the filename filtered out of the attachments.  Save that filename in a variable. Then set the display mode of the button based on whether a filename was found or not.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

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 designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,396)