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

Community site session details

Session Id : +LyVJv5b2ShUjohODt+Hjv
Power Apps - Building Power Apps
Answered

Patching a Dataverse Image column

Like (1) ShareShare
ReportReport
Posted on 28 Aug 2023 13:47:04 by 287

I have an app where I build a collection of items from a purchase order.

I iterate through the collection and retrieve the image URL of each of the product images so I can display the images next to their description.

Once I'm done editing/changing/reviewing the items in the collection I have a save command that runs a Patch command on a sharepoint dataverse table.  One of the columns in the table is an image column.

 

I setup a sample table with just a product name and an image column for testing how to patch the image.

I use a flow function to pull the image from a given URL into a collection; again just for testing.

astrontelstar_1-1693230208587.png

The data comes back apparently in the correct image format?  

astrontelstar_2-1693230272598.png

 

When I try to use this to patch the test table, I'm getting an type mismatch error, it says the ProductImage column field is expecting a record?

 

When I run the patch command using an image control whose property is First(Col).imagedata it works no problem.

Unfortunately I can't use the image control because I need to patch this as I'm iterating through my PO items.

Any ideas what the right syntax is here?  

 

astrontelstar_0-1693230087530.png

 

Categories:
  • Verified answer
    Hussein Wahba Profile Picture
    55 on 31 Aug 2023 at 15:57:18
    Re: Patching a Dataverse Image column

    Unfortunately, there is no documentation for it, but I followed the errors that appeared in the formula.

    The first error was saying that I was passing a string, but the type was a record, so I started to pass a record.

    Then the error changed to passing the mandatory columns one by one.

    One of the trials was retrieving the data from the Dataverse but it was retrieved as an image directly without a structure.

  • astrontelstar Profile Picture
    287 on 31 Aug 2023 at 15:35:44
    Re: Patching a Dataverse Image column

    Thank you!  The missing part was the Value and Full as a record.  Any idea where you found that?  I searched everywhere.   In my particular case FLOW seems much more complicated syntax than a canvas app so I'm using it instead.  It seems to work fine now with your information!

     

  • Verified answer
    Hussein Wahba Profile Picture
    55 on 31 Aug 2023 at 15:07:17
    Re: Patching a Dataverse Image column

    The error is passing the data in the field directly, the field of type image should be passed as a record with a schema of two fields each one having the base64 value as follows:

     

    Patch(
    	testImageTables,
    	First(
    		Filter(
    			testImageTables,
    			ProductName = "test"
    		)
    	),
    	{
    		'ProductImage': {
    			FileName: "test.png",
    			Value: First(Col).imagedata,
    			Full: First(Col).imagedata
    		}
    	}
    )

     

    I don't know what the difference between the value and full columns of the image is, but both should be an image, I cannot find any documentation about the difference between the two fields.

     

    Also, I think it will be better to update the image from the flow directly instead of sending the data between the app and the flow.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete