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
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.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

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