web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Image Field on Dataverse
Power Apps
Answered

Image Field on Dataverse

(0) ShareShare
ReportReport
Posted on by 207

How do I patch a record in a Dataverse table's image column? I can do this in Sharepoint but not sure how to do this with Dataverse. 
I don't want to use Power Automate, it has to be with a patch formula. 
This is what I have but get an error that says the datasource is invalid...

The image is in an Image control called HiddenImageControl1.

upload file to companies.JPG

Formula on my Upload button.
Set(_addfile,JSON(HiddenImageControl_1.Image,JSONFormat.IncludeBinaryData));
Set(_base64File,Mid(_addfile,Find(",",_addfile)+1,Len(_addfile) - Find(",",_addfile) -1));
Set(_upload, false);
Patch(Filter(Companies, 'Company Name' = CompanyName.Text),
{'Company Logo':HiddenImageControl_1.Image});
 
Below is the error from Monitor when I click the button.
 
error loading file.JPG
Anyone tried to do this?
Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @barlowse ,

     

    Firstly, please make sure the picture is in base64 format.

    Secondly, Image column expects a record . Its format is {Image:{Value:"***",Full:"***"}}

     

    I've made a test for your reference:

    1\ This is my image control 'Image1'.

    v-xiaochen-msft_0-1612414475398.png

     

     

    2\ Add a button control and set its onselect property to:

    Patch(Students,First(Students),{Image:{Full:Image1.Image,Value:Image1.Image}})

     

    3\ Add another image control 'Image2' to show the Image value in my first record.

    Set the image property of 'Image2' to:

    First(Students).Image.Full

     

    4\ The result is as follows:

    v-xiaochen-msft_1-1612416169138.png

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

     

  • Verified answer
    barlowse Profile Picture
    207 on at

    Thanks for the help! I figured out that my issue was having a filter in my Patch statement. Once I removed that - all worked beautifully.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard