I have a functioning power app that uploads to a sharepoint list with about 40 columns. I have a "Submit Form" button at the bottom that performs the submit(form) function OnSelect. I would like the option to "Upload Image" to the sharepoint list as well.
1) What sort of column does this need to be on the sharepoint list? I would like it to just be a hyperlink...
2) Getting the "Upload Image" into the form is simple, but how do I get the "Submit Form" button to also include the uploaded image?
3) Does the default column "Attachments" come into play?
Solved! Go to Solution.
Hi @water-guy-5,
According to your description, I think the Multiple lines of text column in SharePoint is suitable.
I have a test on my side, please try the following workaround:
I created a Multiple lines of text named picture in SP and Add picture control in canvas.
Set the OnSelect property of AddMediaButton to following:
Set(VarPic,Substitute(JSON(UploadedImage.Image,JSONFormat.IncludeBinaryData),"""",""))
Set the Update property of picture_DataCard
VarPic
The uploaded picture will be saved in the picture column as binary text like this:
The attachment column in SP is also an option, but it has a size limit on the uploaded file, Currently there is a limit of 10 MB.
Best Regards,
Zhi Chen
The usual way of getting images into SharePoint from Power Apps is to use Flow to create an image file in a document library. You can set the Flow to update metadata of the file to link back to your SharePoint item and return the URL of the image to Power Apps as a parameter that you can patch to a SharePoint column.
Shane Young and Reza Dorrani have good tutorials on YouTube explaining the process.
Matthew Devaney has written a good blog post on the subject. It is for all files but the same concept can be applied to uploading photos.
https://matthewdevaney.com/power-apps-easiest-way-to-upload-files-to-a-sharepoint-document-library/
Hi @water-guy-5,
According to your description, I think the Multiple lines of text column in SharePoint is suitable.
I have a test on my side, please try the following workaround:
I created a Multiple lines of text named picture in SP and Add picture control in canvas.
Set the OnSelect property of AddMediaButton to following:
Set(VarPic,Substitute(JSON(UploadedImage.Image,JSONFormat.IncludeBinaryData),"""",""))
Set the Update property of picture_DataCard
VarPic
The uploaded picture will be saved in the picture column as binary text like this:
The attachment column in SP is also an option, but it has a size limit on the uploaded file, Currently there is a limit of 10 MB.
Best Regards,
Zhi Chen
Worked perfectly, thanks so much!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
191 | |
67 | |
46 | |
42 | |
20 |
User | Count |
---|---|
247 | |
120 | |
83 | |
75 | |
69 |