cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChadVKealey
Memorable Member
Memorable Member

How to clear an Image column in Dataverse?

I have a table called "Desks" with an image type column called "DeskImage". In a canvas app, I'm using the AddMedia control to populate that column and that part works fine using this Patch formula:

 

Patch( Desks, Defaults(Desks), { Title: tbNameDesk.Text, Floor: tbFloorDesk.Text, DeskImage: imgDesk.Image, Description: tbDescrDesk.Text, ActiveChoice: If(toggleActive.Value,'ActiveChoice (Desks)'.Yes,'ActiveChoice (Desks)'.No), RestrictedChoice: If(toggleRestricted.Value,'RestrictedChoice (Desks)'.Yes,'RestrictedChoice (Desks)'.No) } )

 

However, users will also need to be able to clear (not just replace) the image. I've tried using Patch:

 

Patch(Desks,varManageSelectedDesk,{DeskImage: Blank()})

 

This doesn't produce any error, but it also doesn't work to clear an image after it's been saved to a record in the table.

7 REPLIES 7
cchannon
Super User
Super User

Images are stored as an encoded string... Have you tried just patching the column to ""?

ChadVKealey
Memorable Member
Memorable Member

Blank() works for clearing other text/string columns (at least in SharePoint, not sure about Dataverse). However, I did also try "".

07GT
Helper I
Helper I

@ChadVKealey Did you ever find a solution to this? I have the same issue!

 

Jason

ChadVKealey
Memorable Member
Memorable Member

No, I did not. As it turns out, the solution I was building was (once again) abandoned because someone decided to buy an off-the-shelf product.

07GT
Helper I
Helper I

Ahhh, that’s frustrating. So much potential to make great apps with this system. Off the shelf just can’t be customized as quickly/easily.

No, they can't. But, in my experience, folks would rather live with that frustration than actually talk through their requirements so we can build them something that meets them. I love it when they use the phrase "we just want to..." and follow that up with some insanely complicated requirement without any real justification.

07GT
Helper I
Helper I

Haha so true! I find a lot of users can't actually articulate what they want clearly, so building becomes this constant back and forth, and maybe it takes three or four tries to "get it right". But good things can take a bit of time sometimes. I've often found if we can build something that works and it makes life easier, users won't look for other options or go back to the old way.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (2,896)