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 / BUG REPORT: Imported E...
Power Apps
Answered

BUG REPORT: Imported Excel Table in Collection - Blank Date Field Can't be Patched

(0) ShareShare
ReportReport
Posted on by 149

Unable to patch a date from a datepicker or textbox into a blank date field of a record.

 

I created a new Excel spreadsheet to test the issue I ran into with my main app and source file just to be sure.  I can't find anyone else to even try and reproduce the issue, but I'm pretty sure it's a bug.

 

I created the table in Excel with a firstName, lastName, DOB (date field), and randomNumber.  I created 10 test records with all fields filled out.  Then I deleted the DOB for one of those records.

 

I then created a blank power app, connected to the Excel file through the OneDrive for Business Connectior and added the following OnVisible property:  ClearCollect(testing,Table1)

 

I created a gallery and set the Items property to: testing

 

It showed all 10 items.  I added a DatePicker and set its SelectedDate property to: DOB

 

I added a Button and set its OnSelect property to: Patch(testing,ThisItem,{DOB: DatePicker1.SelectedDate})

 

To ease the testing process, I created another gallery and set its Items property to: Filter(testing,lastName =Gallery1.Selected.lastName)

 

I then went in to test it.

 

I was able to change the DOB for all records that didn't have a blank DOB value.  When I tried to do it with the record where I had left the DOB blank, nothing happened.

 

In Excel, I verified that the format for all cells in the DOB column, both with a date and blank, were Date* format.

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @seraph787,

     

    Could you please share more details about your app's configuration?

     

    Thanks for your feedback, I have made a test using the Patch fucntion within my app, and the issue is confirmed on my side.

     

    As an alternative solution, you could also take a try with Update function or UpdateIf function to achieve your needs. I have made a test on my side, please take a try with the following workaround:3.JPG

     

     

    Set the OnSelect property of the "Update" button (Button control) to following formula:

    Update(
    testing,
    ThisItem,
    {
    lastName:ThisItem.lastName,
    firstName:ThisItem.firstName,
    DOB:DatePicker1.SelectedDate
    }
    )

    or 

    UpdateIf(
    testing,
    lastName=ThisItem.lastName&&firstName=ThisItem.firstName,
    {
    DOB:DatePicker1.SelectedDate
    }
    )

    The GIF image as below:Test1.gif

     

     

     

    Best regards,

    Kris

     

     

  • seraph787 Profile Picture
    149 on at

    Thanks for writing back, Kris. 

     

    And thank you for the workaround.  Specifically, the UpdateIf function is the best solution for my purposes due to the high number of fields in each of my records for my actual app/table/collection.  Luckily, I already have a unique record ID field in that one, so I can reference that reliably as the condition parameter.

     

    This is hugely helpful.

     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard