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

View PDF SharePoint list attachment

Dear all

 

I currently have to deal with a problem with viewing PDF documents attached to SharePoint list items.

I need to filter the list based on the item ID an access the items attachment. 

I've solved the document property of the PDF viewer as follows (where Param("ItemID") is the Item ID I hand over to the app)

 

 

 

If(
    !IsBlank(Param("ItemID")),
    Concatenate(
        "https://obcsuisseag.sharepoint.com/sites/PowerAppsProzesse/Lists/Kreditorenrechnungen/Attachments/",
        Param("ItemID"),
        "/",
        First(
            First(
                Filter(
                    Kreditorenrechnungen,
                    ID = Value(Param("ItemID"))
                )
            ).Attachments.DisplayName
        ).DisplayName
    ),
    LookUp(
        Gallery_Approver.Selected.Attachments,
        DisplayName = First(Gallery_Approver.Selected.Attachments.DisplayName).DisplayName
    ).Value

 

 The output of the concatenate function produces a correct link which leads me to the correct file if I open it in the browser. 

But if I try to open it with the PDF viewer I get the following message:

 

"Couldn't open PDF file. Open in my browser instead."

 

Does anyone has an Idea how to solve this issue?

 

Thanks a lot in advance!

 

All the best

 

Sebastian

 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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