cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AdamE
Level: Powered On

EditForm Update Errors

Hi Everyone,

 

I've create a basic canvas phone app through the wizard using a CDS Entity for the data source. When I edit a selected record through the EditForm, if I clear a field that has text in it and then submit the form, the system throws an error message "An entry is required or has an invalid value" for the field I cleared. This happens in multiple text input fields I have tested. These fields are not defined as required fields in CDS. I would think I could clear the data in one of these fields and submit the record change. It seems to act as though once the record is saved with a value in one of these text input fields that it requires a value in it going forward. 

 

Can someone please explain to me why this is happening and what I can do about it? Thanks for any help or ideas.

 

AdamE

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Level 10

Re: EditForm Update Errors

Hi @AdamE ,

 

To update a Null value, you should firstly turn on the New feature ” Formula-level error management”, and use Blank() to convert the empty string to Null value.

 

The Text Input control in EditForm will return an empty string if no characters are within it. But CDS entity need a Null value to update the empty text field.

So you will need to convert the empty string returned by the Text Input control into a Null.  The easiest way to do this is by using the formula Coalesce( TextInput.Text, Blank() ).

You can place it on the Update property of DataCard in the form.

 

So please refer to following steps:

  1. Turn on the New Feature setting: Formula-level error management.From File – App Setting – Advanced Setting – Formula-level error management.
  2. Unlock the DataCard of form in Advanced property.
  3. Modify the formula of update property of DataCard as below:
Coalesce( DataCardValue1.Text, Blank() )

For more information, please refer to this Blog: Empty strings vs. Blank (Null) values

 

Best regards,

Sik

View solution in original post

1 REPLY 1
v-siky-msft
Level 10

Re: EditForm Update Errors

Hi @AdamE ,

 

To update a Null value, you should firstly turn on the New feature ” Formula-level error management”, and use Blank() to convert the empty string to Null value.

 

The Text Input control in EditForm will return an empty string if no characters are within it. But CDS entity need a Null value to update the empty text field.

So you will need to convert the empty string returned by the Text Input control into a Null.  The easiest way to do this is by using the formula Coalesce( TextInput.Text, Blank() ).

You can place it on the Update property of DataCard in the form.

 

So please refer to following steps:

  1. Turn on the New Feature setting: Formula-level error management.From File – App Setting – Advanced Setting – Formula-level error management.
  2. Unlock the DataCard of form in Advanced property.
  3. Modify the formula of update property of DataCard as below:
Coalesce( DataCardValue1.Text, Blank() )

For more information, please refer to this Blog: Empty strings vs. Blank (Null) values

 

Best regards,

Sik

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 135 members 5,375 guests
Please welcome our newest community members: