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

Delete date value SharePoint List

Hello,

 

Have been been testing and playing with the embedded PowerApp (customised SharePoint forms) and cannot delete a date from the list after it has been saved. This problem has existed for some time with 'regular' PowerApps and even trying to Patch a null value doesn't seem to work.

 

I appreciate that many times you will not need a date to be deleted, however there are occasions when an incorrect record has been updated with a date and this needs to removed.

 

Does anyone have any solutions or recommendations to workaround this apparent limitation.

 

cheers Richard

1 ACCEPTED SOLUTION

Accepted Solutions
ktvision
Level: Powered On

Re: Delete date value SharePoint List

My post below used to be working fine, but it is not working anymore.

 

Here is the new solution that someone posted.  https://powerusers.microsoft.com/t5/General-Discussion/Update-blank-Null-value-to-fields-Date-User-C...

 

Don't follow the direct below.

 

If you haven't figure it out.  Here is the solution for you.

 

Update the Default Value and On change properties as below.  It works well.  Hope it helps you.

 

In the PowerApp,

Date picker Name : dDue

Create a Variable: vDate 

 

Default ValueIf(vDate="Empty",Blank(), If(vDate="NotEmpty", dDue.SelectedDate, Parent.Default ))
On ChangeIf(IsBlank(dDue), Set(vDate, "Empty"), Set(vDate, "NotEmpty"))

View solution in original post

11 REPLIES 11
leyburn19
Level 10

Re: Delete date value SharePoint List

Heve you tried Blank()

 

 

it supposed to set a record to null

 

RichardB
Level: Powered On

Re: Delete date value SharePoint List

Hi there.. thanks for the quick response

 

I have tried this, but it doesn't work for me. This is the code I'm using

 

Patch('Test PowerApps List',First(Filter('Test PowerApps List',ID = ThisItem.ID)), {CompletionDate:Blank()})

 

It doesn't error, it just doesn't work !

 

leyburn19
Level 10

Re: Delete date value SharePoint List

How many records in the table.  If over 500 there will be an issue with delegation

Community Support Team
Community Support Team

Re: Delete date value SharePoint List

Hi @RichardB,

 

My understanding is that when you do not select any date in the datepicker control(which binded to SharePoint date column), and submit the EditForm, you want to display blank value in SharePoint, not the default date. 

 

If try to create a new item directly in SharePoint site, you will notice that even though you do not select any date, this column will still show some date by default. So this is not just issue with PowerApps. To achieve this, you could actually try to set it on SharePoint list when you create one. 

 

I'm no expert on SharePoint, so I have found a blog talking about this:

The writer used the following formula:

=IF(ISBLANK([New Completion Date]),””,TEXT([New Completion Date],”MMMM YYYY”))

SharePoint calculated column formatting a date that is null - Wendy Neal

http://wendy-neal.com/2015/08/sharepoint-calculated-column-formatting-a-date-that-is-null/

 

Or you could post this question in SharePoint community and ask about this:

https://social.technet.microsoft.com/Forums/sharepoint/en-US/home

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RichardB
Level: Powered On

Re: Delete date value SharePoint List

Hi Mona,

 

Thanks for your response, however it doesn't quite address the issue I've described.

 

My scenario is I have a date already saved in the SharePoint list (either saved via PowerApps or some other process)

 

I would like to use PowerApps as the mechanism to then delete this date from the SP list and would like to know the PA syntax/formula that should be used to achieve this.

 

thanks

 

Richard

 

 

DanielK
Level: Power Up

Re: Delete date value SharePoint List

 Hi RichardB,

 

Did you find a solution? I have the same problem.

 

Regards, 

Daniel

RichardB
Level: Powered On

Re: Delete date value SharePoint List

Hi Daniel,

 

Have to confess that I didn't pursue this one any further and just implemented a work around by setting the date to 1/1/1900 and then handling that in the UI.. not ideal, but it worked (up to a point) as long as you handle this when doing any date calculations such as DateDiff etc.

 

I believe that PA is going to provide the functionality to write Null values into SharePoint lists, but don't have any details .. is there anyone from the PM group who could provide further information on this?

 

cheers

Richard

Highlighted
zac1
Level: Powered On

Re: Delete date value SharePoint List

zac1
Level: Powered On

Re: Delete date value SharePoint List

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,607)