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.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (36,642)