cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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...

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate I
Advocate I

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

I ended up adding a second column in sharepoint

 

Date/time and text

 

I set text to be the date column that shows in sharepoint.  Date/time column is hidden.

I set text field to = date or blank

View solution in original post

16 REPLIES 16
Highlighted
Community Support
Community Support

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

Thanks for your sharing.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate II
Advocate II

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

Thanks so much@!

Highlighted
Advocate I
Advocate I

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

enabled but how do I blank the date value in sharepoint list to zero?

Highlighted
Advocate I
Advocate I

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

Edit the item and don't enter any value in Date field to submit blank date.

If your requirement is to submit 0 (zero) as the date value, then you need to consider that the date format type does not allow to do so.

Instead of that, submit blank date and in the display form include function to display 0 (zero) if date is blank.

Highlighted
Advocate I
Advocate I

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

Thanks Sanoj but that is not what I need to do.

 

I have a date select when someone checks out a laptop from loan pool.  The return date is selected so we know when it's due back. These details are then written to sharepoint list

 

When the laptop is returned, I need to write null value into the date format column in sharepoint.    There is no item to edit, just need to write "" to a date format column

Highlighted
Advocate I
Advocate I

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

How and when (is there any event like a button click or so) the details are written to SharePoint list.

Similarly, trigger the event when the laptop is returned and update the list.

Use Patch function to update the item.

Reference : https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch 

Highlighted
Advocate I
Advocate I

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

pls provide code for this - what should go where XXX is?  Can't use 0.  Can't use ""

 

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

Highlighted
Frequent Visitor

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

I have a similar issue, but I need to be able to blank the date value in the sharepoint list. 

 

Background:

I have a Redlight/Greenlight that checks a Field in the sharepoint list under a date/time formatted column.

If(!IsBlank(ApprovedDate), RGBA(12, 126, 44, 1), RGBA(255, 51, 51, 1))

 

This redlight/greenlight is simply a color indication if an item is approved or not. There are other parts of the app which patch in the date value to the Record in the sharepoint list at the time of approval. 'Sally' completes a task and her manager is informed via email. 'Sallys manager' views the task and approves it. Moments later 'Rachel' tells 'Sallys manager' that she received an invoice from 'Sally' with conflicting data. 'Sallys manager' now needs to clear the date value from the sharepoint list so that 'Sally' can rework the task.

 

Occasionally, mistakes are made and the Date value needs to be removed. The Admin (who has access to the sharepoint list) could simply go to the list and clear the date value, if I could figure out how to reset the values (instead of creating an admin interface and juggling user permissions).

 

The value of the date removal is that now the users of the app can go back to workflow.

Highlighted
Advocate I
Advocate I

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

I ended up adding a second column in sharepoint

 

Date/time and text

 

I set text to be the date column that shows in sharepoint.  Date/time column is hidden.

I set text field to = date or blank

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,871)