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...

24 REPLIES 24
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
Power Participant
Power Participant

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 🙂

I created a Text Field in SharePoint to hold the values and use the Blank function like below

Patch(List',lookup(List,id=thisitem.id),{returndate:Blank()})

Do the same for People Picker Fields - Usually just store the email address in text field

 

I always try and use Text and Number fields and handle the complex data types within PowerApps controls then store simple text in SharePoint with an index that field - works well for me..  I am sure there are situations where that is not ideal... 

This is not correct. Powerapps will work with the SharePoint Display or Internal field name. One needs to be in single quotes (Display) , the other no quotes. The solution to this issue is in the original post. You have to turn on those features. One is no longer experimental as of this post (Delayed Load), the other is still experimental. Both have to be on to clear dates, and people fields. Check to see if you already have them on....

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,596)