web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Can't patch blank date...
Power Apps
Unanswered

Can't patch blank dates to Excel

(0) ShareShare
ReportReport
Posted on by

hello,

 

I am building an app for a client with a data source that accepts various dates in an excel table. datePicker.SelectedDate will update just fine when a date is selected. However, when adding a new record/new form powerapps gives an error when date fields are blank. 

 

patching_blank_error.png

 

Information about app:

Data is updated via form functions SubmitForm/NewForm.

Blank() textual data updates just fine, problem is only with date fields.

Formula Level Errors is enabled.

 

Things I've tried:

DataCard.Update: Blank() seems to work just fine. But will obviously not work for actual selected dates 

If statements do not work - DataCard.Update: If(IsBlank(DatePicker.SelectedDate), Blank(), DatePicker.SelectedDate) **Yields the error above.

Variations of said if statements don't work: DataCard.Update: If(IsBlank(DatePicker.SelectedDate), "", DatePicker.SelectedDate),

DataCard.Update: If(IsBlank(DatePicker.SelectedDate), Text(Blank()), DatePicker.SelectedDate),

DataCard.Update: If(IsBlank(DatePicker.SelectedDate), DateValue(Blank()), DatePicker.SelectedDate),

DataCard.Update: If(IsBlank(DatePicker.SelectedDate), DateValue(""), DatePicker.SelectedDate)

 

Now, I have found a workaround that successfully submits blank date. However, this workaround still results in an error that doesn't seem to interrupt the program. *Error below*

patching_empty_error.png

Workaround:

DataCard.Update: If(IsBlank(DatePicker.SelectedDate), DateValue("EMPTY"), DatePicker.SelectedDate)

 

I'm not really sure why this works but other variations of textual data like blank strings do not. 

As of now, I have this code in my program but am not really comfortable delivering the product like this. I don't like the idea of random peripheral errors in my code if they are avoidable.

 

Thanks!

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard