cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Unable to Delete a Date

Hi All,

 

I am using SharePoint List as my data source, and I have date columns which are not mandatory field for the record, everything works perfectly when I add a record, delete a record from PowerApps.

 

When I try to edit the record, it works fine except when I delete a date, for example, I already have a date "4/15/2021", now I want to empty this field, as I don't need the date anymore, I can operate in PowerApps with no errors, but when you come back to the record in PowerApps or in SharePoint list, the date "4/15/2021" is still there.

 

This happens as well when the data source is in Excel in OneDrive. Do you have similar experience? Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Eelman
Community Champion
Community Champion

@Anonymous 

Turn on Formula-level error management in Settings then Patch Blank() back to SP as your new Date, eg

 

// Example code
Patch( yourSPList, Lookup( yourSPList, ID = refID), {yourDateColumn: Blank()})

 

View solution in original post

3 REPLIES 3
Eelman
Community Champion
Community Champion

@Anonymous 

Turn on Formula-level error management in Settings then Patch Blank() back to SP as your new Date, eg

 

// Example code
Patch( yourSPList, Lookup( yourSPList, ID = refID), {yourDateColumn: Blank()})

 

Anonymous
Not applicable

@Eelman ,

 

Thanks, but I am using SubmitForm() function instead of Patch, not sure how it works.

Eelman
Community Champion
Community Champion

@Anonymous 

For the Update property of the DataCard that relates to your date field, write some logic the sends back Blank if the date is deleted, eg

 

If( IsBlank(DataCardValue1), Blank(), DataCardValue1.SelectedDate )

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

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.

<
Users online (3,273)