web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to attach a genera...
Power Apps
Answered

How to attach a generated PDF to a form for Sharepoint submit?

(1) ShareShare
ReportReport
Posted on by 65

Hello, I have an interesting question about how to submit a generated PDF into a Sharepoint list, by using a form. 

First, I have successfully generated a PDF from a container, which contains a gallery with data. This is done with the following (new) PDF-command:

Set(pdfStemReport,PDF(contStemReport,{ExpandContainers:true}));

So, after this command, I have stored the PDF in my variable "pdfStemReport" with datatype Blob. I know that the file is generated, because I can check with the PDF-viewer.

 

The goal is to store this generated PDF in a new item of my Sharepoint list and therefor I created a form, which is connected to that list. So, that form contains fields for all the Sharepoint columns, including the Attachement field.

 

My idea was to load the generated PDF as default value in the Attachement datacard of the form and then submit the form to Sharepoint, so that all data comes in my list, including the attached PDF. However, this does not work because I get the following error when setting the PDF-file as default value for the Attachement datacard:

 

Attach.png

 

So, I ave no idea if this is possible or how I should do this...

Any help is much appreciated!

I have the same question (0)
  • Verified answer
    365-Assist Profile Picture
    2,324 Moderator on at

    I would suggest using Power Automate. The Microsoft documentation explains how to do this -> Work with the PDF function (experimental) - Power Apps | Microsoft Learn

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw

    Regards
    Darren Lutchner - 365 Assist

  • PimJ Profile Picture
    65 on at

    Thanks for the suggestion to use Power Automate, but this places the generated PDF in a Sharepoint document library, while my request is to have it as attachement in my Sharepoint list, together with other data.

     

    In fact my question is quite simple: how can I "connect" the generated PDF (the Blob-data?) to the Attachements- datacard of my list-form, so that I can submit this directly to a new list item?

     

  • Verified answer
    365-Assist Profile Picture
    2,324 Moderator on at

    Apologies for the confusion. I made a video on the topic you want -> Power Apps- Why I stored documents in a List rather than a SharePoint Document Library. - YouTube

     

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw

    Regards
    Darren Lutchner - 365 Assist

  • PimJ Profile Picture
    65 on at

    Thanks a lot Darren, this is very helpful for me!

    I was completely new to Power Automate, but I like the way how it works and I'm happy with all the features that it provides. I discovered that it is possible to add the generated PDF as an attachement to a Sharepoint list, but I also like the option to save the PDF to a Document Library - with additional doc. attributes being set! It seems that the Document Library is also kind of List, which gives all the same options like sorting, grouping and filtering.

    So yes, I learned a lot - thanks again for helping me in the right direction!

    Regards, Pim

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard