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 / Patch image in sharepo...
Power Apps
Suggested Answer

Patch image in sharepoint list and Json Binary issues

(0) ShareShare
ReportReport
Posted on by 16
Dear, 

I have a PowerApp where I take images with my mobile device, could be a tablet or phone. 
However, when I take a picture, display it in the app and save it to a sharepoint list, it always shows the picture in the app, but doesn't always save the image in the sharepoint image column. 
My column type is image in sharepoint. 

When I take a picture using the PowerApps App version on my Microsoft Service Go 4 tablet, it stores the image like this: 
data:image/png;;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF58vVeTrltyJrQ+V1W7tjmmW91CzI+YYGRguCGCa2CQoEUE3GIECmk0E1zA38VI6u5jtiv7GeJxK/N9q5rqOL33rvrqNWvlynzySbf5P/+H//xyOp/G8flpbHebsd2Osd1uxmazGfg6Hs/jcrmM8/nMf2+327Hf7cbYXMb5chzbzWns9ttxdXUY58tmPDwex8P9cWw2h3HYX4/ddjt2u83Y77bjeHoaX75+4u+/e/d+bDa78fR0HM/PpzEGPrPnPc6X89jtd3yOcTmP0+nI++62O14PT3Y6n/nMfMzNmfc4HHAPPNPg818u+OFunM8bPhvut+U9LrjLuFxOet/dZhyfn8d2uxv7/WFgPcY4jv1hN86XyzieTmO72Y3NZjs2l+244NexFrz5ZewPe/4+

When I take a picture isuing the PowerApps App version on my Ipad 2022, it stores the image like this: 
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF7svQuXKymONepHnvm6uk/NdM/r/v+/OZVp3yUIOWQMbEAQRNjyWj01JwlekhAbSYjzn3//9/sp87vdfjKl59PpRP/T/Kj77BA0jcO69/v9dD77OfB/6W/0k2XxhmbP/3w6ny8KHtxP9/stS3+mSWr+C6mSdGZapj64XIiG4/iP+ocCYh9kKYDom5cfPXF///59+v7+Pt1ut9P3988iz2u7+fHh9evXV+qnXT9ex+R+TD+aH39Lf7tcLk7znu95DXy/pdu/n08n9z89G5rXP5KPUvokOVRI31YSaMfX2i/X09Jv9vh18z+f0P6D6OOlv3UFYP2B56frH+3/fn9P/86///idnb1WgY4lAG4dfXF0AIgA+NgNDC9ArGAc1E6yCS/gPIdR/0g+rFxHXy3/E

The main difference is that in the error in the first image there are 2 ;; (semicolon) and in the correct version there is 1 ; (semicolon). 

Any idea why this issue occurs, and how to fix it?

Thanks, 

Luuk
Categories:
I have the same question (0)
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
     
    How are you patching your image to SharePoint?
     
    Are you using the "Add Picture" control to save the clicked picture to the SharePoint list? If yes, 
    please know that it is a Composite control and you will need to refer the UploadedImage property in your Patch function for this to work right. 
     
    You will find there are two sub-controls in your Add Picture control:
     
    Here's how you can do it:
    Patch(
            SharePointList,
            Defaults(SharePointList),
            {
                image: UploadedImage2.Image
            }
        )
     
    Hope this helps but do share how you're patching it its different from above. 
     
    Kind regards, 
    Nandit

    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
  • Luuk_148 Profile Picture
    16 on at
    Hi @Nandit, 

    Thanks for your response. Before I patch, I first create a collection to review the images in the app. 
    I have a camera component where, on OnSelect I execute the following; 
     
    Set(
        varPhotoName,
        GalleryOrderData.Selected.KEY_prdh_prdr_prbv & " - "&Text(Now(), "yyyy-mm-dd-hh-mm-ss"& ".png")
    );
    Set(VarGUID, GUID()); // Generate a Unique ID for saving the pictures
    
    Collect(
        CameraCollection,
        {
            DisplayName: VarGUID,
            Id: varPhotoName,
            Value: Camera1.Photo    // Substitute(Camera1.Photo, ";;", ";") or try to convert it back to a record
    } )
    
     
    I can then display the images in the app to execute additional actions. This works on any device, no matter what. 

    Then I patch that collection using the following: 
    ForAll(
        CameraCollection,
        Patch(
            'Spuitmeter registratie bijlagen_1',
            Defaults('Spuitmeter registratie bijlagen_1'),
            {
                KEY_prdh_prdr_prbv: GalleryOrderData.Selected.KEY_prdh_prdr_prbv,
                GUID: ThisRecord.DisplayName,
                CameraImage: ThisRecord.Value}
    ));
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,045

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 592

Last 30 days Overall leaderboard