cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ps2
Level: Powered On

Return Attachment to SP List via Collect

Hello everyone,

 

I've created screen on which I'm creating new entries on SP List via Collect function (important: not using Form, just few controllers and pushing them to SP List via Collect() ). Everything works perfectly so far. Today I wanted to add attachments. I added attachment controller, however I've no Idea how to push files to SP List. I know that there's table returned (table of what actually?) so I've tried code below:

Collect(
    'MyData';
    {   
        Attachments: attachmentsController.'{Attachments}'
    }
)

but it doesn't work. 

 

Do you have any idea how to modify code above to get attachments working?


Thanks in advance!

PS

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Return Attachment to SP List via Collect

Hi @ps2,

Do you submit data into your SP list using Collect function rather than Edit form?

Do you add a Attachments control within your screen?

Based on the needs that you provided, I think there is something wrong with your operation.

Firstly, the Attachments control could only be used within a Edit form in PowerApps currently. You could not use the Attachments control separately within your app.

More details about the Attachments control, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-attachments

If you want to upload attachment files to your SP list item using Attachments control, you should use/enable the Attachments control (field) within a Edit form.

I have made a test on my side, if you want to upload attachments to your SP list item using Collect function, I afraid that there is no way to achieve your needs in PowerApps currently.

Please take a try to use a Edir form to submit your form data along with the attachment files.

Please check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/add-attachments-to-sharepoint-lists/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Return Attachment to SP List via Collect

Hi @PS

When you say 'attachment controller', I assume you've added an attachment control and you want to use this to add a record with an attachment to your SharePoint list.

The file upload and delete functionality of the attachment control works only from inside a form.

https://powerapps.microsoft.com/en-us/blog/add-attachments-to-sharepoint-lists/

Could you adapt your screen to use a form, or is there any reason why you need to use Collect?

Highlighted
Community Support Team
Community Support Team

Re: Return Attachment to SP List via Collect

Hi @ps2,

Do you submit data into your SP list using Collect function rather than Edit form?

Do you add a Attachments control within your screen?

Based on the needs that you provided, I think there is something wrong with your operation.

Firstly, the Attachments control could only be used within a Edit form in PowerApps currently. You could not use the Attachments control separately within your app.

More details about the Attachments control, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-attachments

If you want to upload attachment files to your SP list item using Attachments control, you should use/enable the Attachments control (field) within a Edit form.

I have made a test on my side, if you want to upload attachments to your SP list item using Collect function, I afraid that there is no way to achieve your needs in PowerApps currently.

Please take a try to use a Edir form to submit your form data along with the attachment files.

Please check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/add-attachments-to-sharepoint-lists/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 93 members 5,471 guests
Please welcome our newest community members: