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 / Including image data i...
Power Apps
Answered

Including image data in submitform

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a form for recording new entries on a Petty Case Sharepoint list. The form contains a few datacards (which work fine) and I am trying to include a camera option to take a photo of the receipt (which isn't working).

I had been using SubmitForm with just the text and number datacards, but have hit a bit of wall when trying to include an ImageData dadatcard or using the attachment facility.

I've experimented with a few options I have found online and have managed to get the camera on its own to work on a test screen using: Patch(BH_PettyCash,Defaults(BH_PettyCash),{'Description (Title)':TextInput2.Text,ImageData:First(cmrImg).Url})  **This employs a text box which is not required in my form, but again I'm not sure how to remove this from the formula.

I have also adjusted the Sharepoint list so that clicking on Title brings up the photo as well in the edit screen, so any soultion hopefully won't change this.

So my question is: how do I include the image taken by the camera in the SubmitForm (or Patch)?

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Are you trying to upload the captured image to a Picture column or as the attachment of an item?

     

    If it's the former, I afraid that there is no direct way to achieve your needs in PowerApps currently.

    As an alternative solution, you could consider take a try to pass the captured pictures (using Camera control) to a flow, then use the flow to create an attachments to corresponding SP list item. Please check and see if the following blog would help in your scenario:3.JPG

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

    https://www.techmikael.com/2017/05/an-even-more-clever-workaround-for.html

     

    If it's the latter, then I think the only way to add attachments to SharePoint list item is using Attachments control.

    More details about uploading images using Attachments control, please check the following blog:

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

     

    Regards,

    Mona

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @

    Thank you for your reply.

    I've attached a screen shot of the Sharepoint list I've set up and the app screen I would like to use.

    I've copied the url into the ImageData column of the Sahrepoint list to test that the image comes up when you edit the line, which it does (as we will need this for auditting purposes).

    As I said I have been able to upload the photo url to the ImageData column (which is multiline text) using the Patch function in isolation on a test screen which I found in a very helpful YouTube video.

    I have also seen in the Budget Tracker template that it is possible to use the camera like this, but in that template the camera is again on a separate screen which I would rather not do if avoidable.

    If absolutely necessary I could move the capturing of the receipt image to another page, but how would I ensure that the ImageData went to the same line that SubmitForm had populated on the 'Add New Item' page?

    Screenshot 2019-10-23 at 09.56.28.png
    Screenshot 2019-10-23 at 09.49.13.png
  • Lars4 Profile Picture
    92 on at

    Did you try to add a "AddPicture" Control to the Datacard of your image column? Then you can take a photo and the BlobStorage address is saved in this text column. 

     

    However, If you want to stay with taking a photo on another screen, you could store its Base64 in a global variable and set this global variable as Default Value of the image column in your form. This way you ensure, that the photo comes to the right line. 

     

    (I prefer the second scenario. And if you have some place left on the screen with the form, you can also do it on the same screen - or you can scroll as well) 

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for everbodys help which has helped me sort this out and understand DataCards more.

    After much experimentation I found a solution that worked: I included the DataImage as a field of the DataCard and then added the Camera function and an Image box to the DataCard. Then I made the DataCardValue equal Camera1.Photo. Whenthe form was submitted it saved all the fields, including the DataImage information. Problem appears solved 🙂

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard