cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sanoj
Advocate I
Advocate I

Update blank/Null value to fields (Date, User, Choice field etc.) in SharePoint list / database

Scenario :  I have saved an item to the SharePoint list and later decided to remove data from some fields (Date field, User field etc).  Edit the item and delete the field value and Save it back to datasource (SharePoin list / SQL database)

 

Issue :  PowerApps does not update the field to empty / null value. The field value remains as such in list.

 

Solution : Enable the "Experimental features" as shown in below screenshot. This will resolve the issue and you will be able to update field value to null after that.

 

 Experimental Feature.png

 

Reference : https://powerapps.microsoft.com/en-us/blog/new-feature-error-handling-and-writing-null-values-to-dat...

22 REPLIES 22
Rene_Kunig
Frequent Visitor

Rene_Kunig_1-1625476536583.pngRene_Kunig_0-1625476504760.png

Hello,

 

I have changed the following in Card under Update..

 

"If(Value(DateValue7.SelectedDate ) = ""; "0" ;DateValue7.SelectedDate + Time(Value(HourValue7.Selected.Value); Value(MinuteValue7.Selected.Value); 0))"

 

Now an empty field is transferred to the database. I think this could also work for Sharepoint.

 

I did not find the experimental option under my settings.

 

Sorry for my English.

 

Greeting René

takolota
Impactful Individual
Impactful Individual

None of these answers worked for me and I really did not want to recreate the date columns in separate text columns.

I had to use this formula on the submit button:

 

SubmitForm(Form1); If(Or(IsBlankOrError(DataCardValue8.SelectedDate), IsBlankOrError(DataCardValue9.SelectedDate)), RecordsRetentionSetNullDates.Run(RecordsRetentionList.Selected.ID, IsBlank(DataCardValue8.SelectedDate), IsBlank(DataCardValue9.SelectedDate)), "");

 

 

And set up a corresponding flow to input those null values in the date fields.

takolota_0-1646780303454.png

 

Victor3
Frequent Visitor

Just in case someone is dealing with this issue still, you only need to use the name of the column sharepoint assings to it, not the one powerapps reads, as an example

 

Patch(
'Loan Equipment',
Gallery1.Selected,
{
STATUS: {Value: "IN STOCK"},
'End User': "",
'User''s Manager': "",
'Date_x0020_Loaned':Blank(),
'Date_x0020_of_x0020_Return': Blank(),
Comment: "",
Comments: "",
Correo: ""}

 

Powerapps finds these columns as "Date Loaned" and Date of return", you need to use the sharepoint column name, you can find it at the address bar once you are in the column settings in the list settings of your sharepoint list.

 

This is why it doesn't give you an empty registry in a date field in sharepoint.

 

I hope it helps someone 🙂

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,104)