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

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
fless1
Level: Powered On

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

14 REPLIES 14
Community Support Team
Community Support Team

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.
zac1
Level: Powered On

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

Thanks so much@!

fless1
Level: Powered On

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?

Sanoj
Level: Powered On

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.

fless1
Level: Powered On

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

Sanoj
Level: Powered On

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 

fless1
Level: Powered On

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})

Joseph1
Level: Powered On

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.

fless1
Level: Powered On

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
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 (Last 30 Days)
Users online (5,677)