Skip to main content
Community site session details

Community site session details

Session Id : TAMXxocSrET0LbdwbeK5Cy
Power Apps - Building Power Apps
Unanswered

Set(CurrentRecord,Patch(DataSource,Defaults(.... fails to retrieve Date Columns

Like (0) ShareShare
ReportReport
Posted on 28 Jun 2022 12:34:24 by 356

I'm using the code below to retrieve the last record saved to a SQL DB.

Set(CurrentRecord,Patch(DataSource,Defaults(.

In the past I've not had any issues with this, but now whenever I use this code, the Date columns are returned empty in the "CurrentRecord" variable. All other Columns return data without any problems, but Date columns are all blank.

 

The record is saved correctly and if I retrieve the record from the DB using Filter, it brings back all columns including Date columns.

 

So is this a bug? How can we solve this issue?

 

 

 

  • UB400 Profile Picture
    356 on 28 Jun 2022 at 15:21:02
    Re: Set(CurrentRecord,Patch(DataSource,Defaults(.... fails to retrieve Date Columns

    @Drrickryp thanks for the reply, however that defeats the purpose of the original code i.e. avoiding making another call to the Data Source to retrieve the record. A point I'd like to make is that I've used the same technique in earlier Apps and then all of a sudden I run into this issue where specifically Date columns are not being returned.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 28 Jun 2022 at 14:57:51
    Re: Set(CurrentRecord,Patch(DataSource,Defaults(.... fails to retrieve Date Columns

    @UB400 

    Why not use Patch(...);Set(CurentRecord,First(Sort(DataSource,ID,Descending))) 

    CurrentRecord.Datecolumn  and see if it works.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete