cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jacky_Shen
Resolver IV
Resolver IV

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
Super User
Super User

@Jacky_Shen 

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
Super User
Super User

@Jacky_Shen 

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

@Eelman ,

 

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

@Jacky_Shen 

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,866)