cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Workaround to patch a Blank() or a Null() to my CDS entity?

I need to be able to Patch a Null or a Blank() or even something like a ThisItem.Default value to an existing record in CDS. Field has data type Float. I know this can be done by turning on the Formula level error thing in the experimental settings but that breaks everything else in my app.

 

I've tried workarounds to no avail...so far.  In the past I've been able to use a workaround to "delete" images by patching in the value of an empty "leaveBlank" column with data type image but this doesn't seem to be working with data type float for some reason.

 

Help much appreciated, TIA.

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

I found a work-around. I created an additional column "blankcheck" with type wholenumber. For the trigger I wanted to use to patch in the null, I instead use to patch the value 1 to this new field. I'm then using a business rule on the entity, if the field blankcheck = 1, use the "set field value" action on the field I actually need to be blank and set it to "Clear". This seems to work. So I'll just patch in the 1 then patch in a 0 to my new column, maybe with some sort of delay to avoid timing issues.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

I found a work-around. I created an additional column "blankcheck" with type wholenumber. For the trigger I wanted to use to patch in the null, I instead use to patch the value 1 to this new field. I'm then using a business rule on the entity, if the field blankcheck = 1, use the "set field value" action on the field I actually need to be blank and set it to "Clear". This seems to work. So I'll just patch in the 1 then patch in a 0 to my new column, maybe with some sort of delay to avoid timing issues.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,982)