cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JenVitug
Level 8

how to patch and update an image field to set it back to blank (e.g. No Picture/image)

how to patch and update an image field in CDS Entity so that  the image is reset  back to blank (e.g. No Picture/image)

 

i have tried Patch('CD EX Amazing Race',ThisItem,{TaskImage1:Blank()})  (OnSelect property of a Trash Icon which i placed inside the datacard of the Image  (the image field was selected directly from the Property of the FORM's datasource, hence it has both the Image and AddPicture controls )

 

Bur it does not work.

 

The "admin" of the app should be able to delete posted images which he deems not appropriate/incorrect.

 

 

3 REPLIES 3
Community Support Team
Community Support Team

Re: how to patch and update an image field to set it back to blank (e.g. No Picture/image)

Hi @JenVitug,

 

May I know why did you use a Patch to manage the records rather  than using an edit form directly? You could try to create an auto-generated app using the entity as data source. In this app, you will see that you could reset the edit form including the picture control inside with ResetForm function:

 

Capture.PNG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JenVitug
Level 8

Re: how to patch and update an image field to set it back to blank (e.g. No Picture/image)

@MONI hi ,

 

The Form has Tasks list for each player to complete.  The completion is to be checked by the  game admin based on the attached Screenshot.

 

cdex1.JPGcdex2.JPG

 

As soon as the player attaches the screenshot and SUBMITs , the task is marked as Completed in Status (True).

However the Game Admin has to check if the Proof of completion is valid.  So we added a "Trash" Icon so that when the Game Admin deems the attached picture as no valid, he can RESET it to blank.  and the Status reverts to False.

Only the picture needs to be reset to blank. and not the other information in the form.

 

The Form contains the following fields:

cdex3.JPG

JenVitug
Level 8

Re: how to patch and update an image field to set it back to blank (e.g. No Picture/image)

@v-monli-msft

i was able to search for a workaround. apparently, you cannot reset/remove an image in the CDS entity image field once it is saved.  another member was having the same issue and i used the workaround suggested there

how to remove image from CDS image entity field.JPG

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 228 members 2,882 guests
Please welcome our newest community members: