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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding Attachments to ...
Power Apps
Unanswered

Adding Attachments to SharePoint List

(0) ShareShare
ReportReport
Posted on by

Hi Experts,

 

I have the below code on a button via the OnSelect, can you tell me how I can add the attachments that the user uploads to my sharepoint list please? They are coming through via email fine but I can't get them into the sharepoint list, I need both the attachments and the signature:

ClearCollect(

   colImages,

   AddColumns(

      RenameColumns(

          AttachmentControl.Attachments,

          "Value",

          "ContentBytes"

      ),

      "@odata.type",

       ""

   ),

   {

      Name: "Signature.jpg",

      ContentBytes: Signature.Image

   }

);

 

Office365Outlook.SendEmailV2("emailaddress@mydomainname.com" , 'Result Job Number'.Text , "Hi,<br><br>

 

Please see completed survey form below and attached drawings<br><br>

 

<a href=https://mydomainname.sharepoint.com/sites/PowerApps/Lists/DoorSurvey/AllItems.aspx>Click Here to View the Full SharePoint List</a><br><br>

 

<b>Customer: </b>"&Customer.Text&"<br>

<b>Address: </b>"&Address.Text&"<br>

<b>Job Number: </b>"&'Job Number'&"<br>

<b>Surveyor: </b>"&Surveyor.Text&"<br>

<b>Date: </b>"&Date.SelectedDate&"<br><br>

 

<b>Notes: </b>"&Notes&"<br><br>

 

Regards<br><br>

 

IT Department<br></br>",

 {Attachments: colImages}

);

Reset(AttachmentControl);

Reset(Signature)

;

Patch(DoorSurvey, Defaults(DoorSurvey),

{

Title: ValueDateTimeNow.Text,

Customer: Customer.Text,

'Site Address': Address.Text,

'Job Number': 'Job Number'.Text,

Surveyor: Surveyor.Text,

Date: Date.SelectedDate,

Notes: Notes.Text

});

Navigate(Success,Cover)

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,064 Most Valuable Professional on at

    Hi @Dave-ITMan ,

    I have a blog on various parts of this process that may be useful to you.

     

    Please click Accept as solution 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 Thumbs Up.

    Visit my blog Practical Power Apps

  • Dave-ITMan Profile Picture
    on at

    Hi @WarrenBelz ,

    Thanks for the quick response, that's about emailing the attachments which i've done but i'm trying to get the attachments and the signature into a sharepoint list

  • WarrenBelz Profile Picture
    156,064 Most Valuable Professional on at

    Hi @Dave-ITMan ,

    You have lost me a bit there - you already have them on an Attachment control. What are you trying to add and how are you collecting it?

  • Dave-ITMan Profile Picture
    on at

    Hi @WarrenBelz ,

    So i'm collecting any images/files that are uploaded via an attachment control, there is also a peninput box for a signature which is being collected using the below code. What i'm trying to do is get all of those images/files and also the signature to upload to my sharepoint list in the attachments area of the record with the results from what they've filled out in the form. Hopefully this makes more sense

    ClearCollect(

       colImages,

       AddColumns(

          RenameColumns(

              AttachmentControl.Attachments,

              "Value",

              "ContentBytes"

          ),

          "@odata.type",

           ""

       ),

       {

          Name: "Signature.jpg",

          ContentBytes: Signature.Image

       }

    );

  • Dave-ITMan Profile Picture
    on at

    I'm also using patch to get the results into my sharepoint list if that helps?

    {Attachments: colImages}

    );

    Reset(AttachmentControl);

    Reset(Signature)

    ;

    Patch(DoorSurvey, Defaults(DoorSurvey),

    {

    Title: ValueDateTimeNow.Text,

    Customer: Customer.Text,

    'Site Address': Address.Text,

    'Job Number': 'Job Number'.Text,

    Surveyor: Surveyor.Text,

    Date: Date.SelectedDate,

    Notes: Notes.Text

    });

  • WarrenBelz Profile Picture
    156,064 Most Valuable Professional on at

    Hi @Dave-ITMan ,

    Using the same principle as in my blog, except this is not an easy one after that and involves sending the collection to Power Automate and creating an Array Variable from it. You might post this on the Power Automate Community.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard