cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PhineasT
Helper IV
Helper IV

Images as Attachments not Uploading to SP List

I broke my New Form some how.

All data is coming through, however the images taken with the camera as part of the form - which are siloed as attachments in the New Form, are not showing up in the SP List.

I have tried both of the below; again, I get all the form data just not the images as attachments in the list.


DataCardValue14 (Form11 attachment control) is on a separate screen.

 

Patch('Scheduler Details List',
Defaults('Scheduler Details List'),
{Title: User().FullName,
CustomerName: DataCardValue25.Text,
PhoneNumber: DataCardValue9.Text,
JobDescription: DataCardValue13_1.Text,
DateArrived: Value(DataCardValue10_1.SelectedDate),
Mileage: Value(DataCardValue17.Text),
ConcernsObservations: DataCardValue24.Text,
Attachments: (DataCardValue14)});

SubmitForm(NewJobForm);
Form11.Updates

1 ACCEPTED SOLUTION

Accepted Solutions

@PhineasT ,

You should be able to submit the form with the Attachment control and save the attachments - the video I linked walks you through this, but you cannot Patch Attachments other than FormName.Updates (with the Attachments in an Attachment control on the Form) but if you are going to do that, you are better just submitting the Form.

View solution in original post

9 REPLIES 9
WarrenBelz
Super User
Super User

Hi @PhineasT ,

You cannot patch attachments except using Form.Updates, but that would not work in your current structure as it would create a separate record. The solution is to simply put them all on one form and either submit the Form or Patch the updates.

 

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

I have an attachments control on a separate screen.


I am referencing the Image Gallery.

 

I can see the images as attachments in the Attachments control.

 

The list showed attachments where added, when I did the submit.

PhineasT_1-1654465183987.png

 

PhineasT_0-1654465160205.png

 

However, when I open the attachments in the SP list of try to view them in the PA view Gallery all I get is black squares.

The New Job Form with a Gallery (for image verification only). You can see the images that I want to Patch as part of the New Job Form Patch. These same images are what is displayed in the Attachment control above. 

Yet, they won't open as images once uploaded to SP.

PhineasT_2-1654465524211.png

 

@PhineasT ,

Did you read my post fully - you cannot do it the way you are trying (you cannot Patch attachments). Also, if these are static images, FormName.Updates will not work as well (they have to have been added to the Form by the User). Why do you have the attachments on a separate screen ?

Yes, sir; read your entire post fully.

I don't need to see the attachments just a visual of them in the Gallery so I move the attachment and Forms gets funky with datacards and snap to and all that. It didn't seem to matter at the time as long as I could referenc the Form/Control.

They are not static images. 

I am using the form to collect data in real-time, including images. The camera takes the pictures and saves them to a collection. I can either put the images in the Gallery directly from the camera control or store and retrieve them from the collection.

All that works. What is not working is how to upload the images to the List at attachments. Are you saying this is not possible?


@PhineasT ,

As mentioned previously, could easily do this with the attachment control on the same form and simply submit the form. Your other (much more complex using Power Automate) option is covered in this video from Shane Young.

 

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

I tried that one other time and still couldn't get it.

Here it is again; form attachment reacquired and loaded into the form (with the Gallery adjacent showing the actual images taken by the camer control, along with two attachments in the attachment control. 


When I click submit no data or attachments are set to the SP List, and no errors are noted.
PhineasT_4-1654470957577.png

 

@PhineasT ,

Just to be clear, you have the attachments in an Attachment Control in a Form, you can view the attachments in a Gallery with the Items 

AttachmentControlName.Attachments

and the Image of

ThisItem.Value

and you are using SubmitForm() and you are saying the attachments are not saving ?

This video from @RezaDorrani sets out the process to follow here, if you are not already doing this.

 

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

Yes, that is what I am saying.

I will watch the video.

Thank you!

Side note, can I not Patch/Submit the images that are in the Gallery on the screen with the New Form?

@PhineasT ,

You should be able to submit the form with the Attachment control and save the attachments - the video I linked walks you through this, but you cannot Patch Attachments other than FormName.Updates (with the Attachments in an Attachment control on the Form) but if you are going to do that, you are better just submitting the Form.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,268)