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

 

@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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,270)