Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Fys8ZKFYq7VIBO7lvpSUqT
Power Apps - Building Power Apps
Unanswered

Attachment control in canvas

Like (0) ShareShare
ReportReport
Posted on 27 Nov 2023 11:54:22 by 84

Hi all,

I want to built a attachment control in canvas to transfer multiple files from canvas to SharePoint using Power Automate flow. 

here is my file attachment container and button 

Screenshot 2023-11-27 170241.png

this is my Fx code on send button in which i am getting error "Invaild no. of arguments: recieved 1 ,expected 3"

Screenshot 2023-11-27 170807.png

here is my power automate flow 

Screenshot 2023-11-27 171621.pngScreenshot 2023-11-27 171644.png

Please help me in this 

 

Thanks for your effort

Categories:
  • sourav456 Profile Picture
    84 on 28 Nov 2023 at 10:05:03
    Re: Attachment control in canvas

    also getting error canvas codeScreenshot 2023-11-28 153327.png

  • v-bofeng-msft Profile Picture
    on 28 Nov 2023 at 08:18:15
    Re: Attachment control in canvas

    Hi @sourav456 ,

     

    In flow create a file section 

    1. file name : file.name

    triggerBody()['file']['name']

    2. file content:

    Just select file content in dynamic content.

     

    I think this link will help you a lot:
    https://www.matthewdevaney.com/power-apps-easiest-way-to-upload-files-to-a-sharepoint-document-library/

     

    Best Regards,

    Bof

  • sourav456 Profile Picture
    84 on 28 Nov 2023 at 06:42:08
    Re: Attachment control in canvas

    In flow create a file section 

    1. file name : file.name

    2. file content: file

    unable to get these , i am new in power apps please explain a bit 

  • v-bofeng-msft Profile Picture
    on 28 Nov 2023 at 01:26:54
    Re: Attachment control in canvas

    Hi  @sourav456 , 

     

    I've made  a test for your reference:

    1\My flow

     vbofengmsft_0-1701134735752.png

    2\My canvas app

    vbofengmsft_1-1701134735258.png

    ForAll(
     AttachmentControl.Attachments As Document,
     'PowerAppV2->Createfile-2'.Run( {file:{
     contentBytes: Document.Value,
     name: Document.Name
     }})
    )

     

    I think these links will help you a lot:

    Solved: sending multiple files from powerapps attachmentco... - Power Platform Community (microsoft.com)

    https://www.matthewdevaney.com/power-apps-easiest-way-to-upload-files-to-a-sharepoint-document-libra...

     

     

    Best Regards,
    Bof

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,788 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard