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 / Clearing Dataverse Ima...
Power Apps
Suggested Answer

Clearing Dataverse Image columns

(0) ShareShare
ReportReport
Posted on by 2
Hello,
I am trying to conditionally Blank() out an Image column.
Assigning Blank() to a variable and then patching in the column does not work. Only if I explicitly do  ImageVehicleDraw: Blank() - then it works.
I want to do it if the image in my collection is Blank(), blank out any previous images in my Table.
Any ideas how?

UpdateContext({
    ctxVarPhoto1: Coalesce(LookUp(colPhotos, Value=1).Photo, Blank()),
    ctxVarPhoto2: Coalesce(LookUp(colPhotos, Value=2).Photo, Blank()),
    ctxVarPhoto3: Coalesce(LookUp(colPhotos, Value=3).Photo, Blank()),
    ctxVarPhoto4: Coalesce(LookUp(colPhotos, Value=4).Photo, Blank())
});
Patch(
    DVVehicleData,
    LookUp(DVVehicleData,
        DateTextPlatePreOrPost = ctxVarAddDrawingDateTextPlatePreOrPost &&
        QuestionsSortOrder = 1
    ),
    {
        ImageVehicleDraw: ctxVarPhoto1,
        PhotoSecond:      ctxVarPhoto2,
        PhotoThird:       ctxVarPhoto3,
        PhotoFourth:      ctxVarPhoto4,
        EmployeeDrawNotes: TextInput2.Text
    }
);
Categories:
I have the same question (0)
  • Suggested answer
    BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at
     
    Try the below formula instead of your Patch formula to pass an explicit Blank() in case there is not picture:

    ​Patch(
        DVVehicleData,
        LookUp(DVVehicleData, DateTextPlatePreOrPost = ctxVarAddDrawingDateTextPlatePreOrPost && QuestionsSortOrder = 1),
        {
            ImageVehicleDraw: If(IsBlank(ctxVarPhoto1), Blank(), ctxVarPhoto1),
            PhotoSecond:      If(IsBlank(ctxVarPhoto2), Blank(), ctxVarPhoto2),
            PhotoThird:       If(IsBlank(ctxVarPhoto3), Blank(), ctxVarPhoto3),
            PhotoFourth:      If(IsBlank(ctxVarPhoto4), Blank(), ctxVarPhoto4),
            EmployeeDrawNotes: TextInput2.Text
        }
    )
    A side note on the UpdateContext formula: The Coalesce function will go through all arguments until it finds a non-blank value. In your formula, the second argument is blank and hence will always be skipped, resulting in.... a blank value. In other words: the Coalesce function does not add anything and could therefore just als well be removed to keep your formula clean:
    UpdateContext({
        ctxVarPhoto1: LookUp(colPhotos, Value=1).Photo,
        ctxVarPhoto2: LookUp(colPhotos, Value=2).Photo,
        ctxVarPhoto3: LookUp(colPhotos, Value=3).Photo,
        ctxVarPhoto4: LookUp(colPhotos, Value=4).Photo
    });
     
     
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
  • TD-10031601-0 Profile Picture
    2 on at
    Unfortuently neither works. It does snot clear the old image. What I ended up doing is checking and based on the check patching 
     
    With(
    {rec: LookUp(DVVehicleData, DateTextPlatePreOrPost = ctxVarAddDrawingDateTextPlatePreOrPost && QuestionsSortOrder = 1),
     photo1: LookUp(colPhotos, Value=1).Photo,
     photo2: LookUp(colPhotos, Value=2).Photo,
     photo3: LookUp(colPhotos, Value=3).Photo,
     photo4: LookUp(colPhotos, Value=4).Photo},
     
    If(IsBlank(photo1),
        Patch(DVVehicleData, rec, {ImageVehicleDraw: Blank()}),
        Patch(DVVehicleData, rec, {ImageVehicleDraw: photo1})
    );
     
    If(IsBlank(photo2),
        Patch(DVVehicleData, rec, {PhotoSecond: Blank()}),
        Patch(DVVehicleData, rec, {PhotoSecond: photo2})
    );
     
    If(IsBlank(photo3),
        Patch(DVVehicleData, rec, {PhotoThird: Blank()}),
        Patch(DVVehicleData, rec, {PhotoThird: photo3})
    );
     
    If(IsBlank(photo4),
        Patch(DVVehicleData, rec, {PhotoFourth: Blank()}),
        Patch(DVVehicleData, rec, {PhotoFourth: photo4})
    )
     
    );
     
    Patch(
        DVVehicleData,
        LookUp(DVVehicleData, DateTextPlatePreOrPost = ctxVarAddDrawingDateTextPlatePreOrPost && QuestionsSortOrder = 1),
        {
            ImageVehicleDraw: If(IsBlank(ctxVarPhoto1), Blank(), ctxVarPhoto1),
            PhotoSecond:      If(IsBlank(ctxVarPhoto2), Blank(), ctxVarPhoto2),
            PhotoThird:       If(IsBlank(ctxVarPhoto3), Blank(), ctxVarPhoto3),
            PhotoFourth:      If(IsBlank(ctxVarPhoto4), Blank(), ctxVarPhoto4),
            EmployeeDrawNotes: TextInput2.Text
        }
    )

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard