cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrstian89
Helper III
Helper III

Attachment control and PDF viewer

All my different items in an equipment list has the ability to carry 10 attachments each.
These are stored in the Dataverse table, on the items row.

 

In my PowerApp I have the AttachmentControl to show the files (jpg/pdf/etc.)

 

Is there a workaround to be able to open the PDF files in the attachment control, inside the app in the PDF-viewer?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @mrstian89 :

I'm afraid that is not available,unless you add one more list box.for example:
1\Add a list box(ListBox1) and set it's items property to:

DataCardValue16.Attachments  /*DataCardValue16 is the attachment control*/

2\Select the PDF file on the list box

3\Set the PDF viewer's Items property to:

ListBox1.Selected.Value

vbofengmsft_0-1636703597053.png

Best Regards,

Bof

 

View solution in original post

3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi @mrstian89 :

Do you want to display a PDF file in the attachment control by PDF-viewer?If so,I've made a test for your reference:

vbofengmsft_0-1636091243481.png

Note:

If you click the file in the attachment, the file will be downloaded. Therefore, the only way is to call the Attachments property of the attachments control, find the PDF file in the file list, and get its Value (URL).

Best Regards,

Bof

 

Thanks for responding!
I am able to make this happen, but when I click on a object in the attachment control, it also prompts me to download the file.

 

Is there any way to choose a OnSelect for the attachment control? If I choose to open the PDF viewer, then it won't prompt me to download the file?

Hi @mrstian89 :

I'm afraid that is not available,unless you add one more list box.for example:
1\Add a list box(ListBox1) and set it's items property to:

DataCardValue16.Attachments  /*DataCardValue16 is the attachment control*/

2\Select the PDF file on the list box

3\Set the PDF viewer's Items property to:

ListBox1.Selected.Value

vbofengmsft_0-1636703597053.png

Best Regards,

Bof

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,267)