cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
steersebastian
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

 
0 REPLIES 0

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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (78,657)