Showing results for 
Search instead for 
Did you mean: 
Kudo Kingpin
Kudo Kingpin

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

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


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?




Super User
Super User


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

CurrentRecord.Datecolumn  and see if it works.

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

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,253)