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 / Auto fill attachment c...
Power Apps
Unanswered

Auto fill attachment card of form with pdf file

(1) ShareShare
ReportReport
Posted on by 10
Hello I try to automate my form, and want to have a pdf file automatically inserted into the form - attachment card.
 
 
I generate the pdf with Set(pdfBlob; PDF(FROMFORM; {ExpandContainers: true}))
 
and add it to the attachment card with
 
 
After trying to submit the Form the issues occures field "id" is required
 
 
How can I set the field id in this case?
 
 
Just for information if I manually upload a file by adding a attachment the submitform success so I guess I have to set some value to the automatically added file ?
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at
    The issue is that the output of the PDF function is incompatible with that expected by an Attachment control and there is no way of converting this is Power Apps. You need a Flow like this
    and the run code sending the ID of the target record (where indicated)
    With(
       {
          _File: 
          PDF(
             FROMFORM; 
             {ExpandContainers: true}
          )
       };
       YourFlowName.Run(
          YourIDHere;
          {
             file: 
             {
                contentBytes: _File;
                name: "Test.pdf"
             }
          }
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
  • Suggested answer
    JM-13120031-0 Profile Picture
    10 on at
    Hi @WarrenBelz thanks for your help, jfyi you don't need triggerbody to add for file name ;) 

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard