[OutSystems Data Grid] Getting Error while Edit All "dt.getTime is not a function"" in data grid reactive
data-grid-reactive
Reactive icon
Forge component by Platform Maintenance
Application Type
Reactive
Platform Version
11.14.0 (Build 34092)

Hi,

I am using latest version of Data grid, we are facing a weird issue where in we are not able to get the changed lines. It was working fine till last week.

Scenario: We have Edit all button on which we are enabling editing few fields of the record. Earlier it was working fine.

Fields are Date, datetime, Text. Not sure, what happened, But now i am not able to get the changedlines itself and get the below message.

Any help would be appreciated

Note: I am aware of the other date issue but its related to date part where in we were not able to change the null date to blank :https://www.outsystems.com/forums/discussion/77482/outsystems-data-grid-datagid-on-getchangedlines-date-value-format-is-not-getti/?utm_source=community&utm_medium=email&utm_campaign=forum-reply#Post320350



2020-08-05 09-00-16
Gabriel Lundgren

Hello,


Could you please send us your sample so we can better understand what's going on? Also, you said this didn't happen on version 2.6.2? 

Nope it didn't happened in 2.6.3 itself, we went live with 2.6.3 only.. Not sure if the new data is causing the issue .. Let me see if i can create a sample. 

But meanwhile any idea on the error which i mentioned above?

2020-08-05 09-00-16
Gabriel Lundgren

It seems that your Date column might not be coming as a Date. Not really sure.

Hello @Gabriel Lundgren ,


Please check the sample attached.

There is an issue with component, if we have a text column like company name/comment and we enter data something like date '2021-12-20' or 2021-12-92 and save all,

next time, While rendering , it considers that column as date column even if it is text column at backend , when we click on edit All, and if we try to change the data of any field it wont allow you, as it doesn't give you changed lines as it doesn't find that date column present..

You can try out in the attached sample. Can you please look into the issue and Let us know the ETA for this as this is pretty critical issue for us.

DataGridSample_v25.oml
Champion

We have observed the code issue in the component. Basically the component tries to identify the columns which are of type - Date and DateTime and manages a list of such columns. Component relies on the data available for every column to categorize them into Date or DateTime and does not consider the pre-defined structure and the datatype.

There are 2 issues with this approach:

  1. Even if one of the records has date/datetime value, it considers the entire column as date and datetime.
  2. The regex is not correct. 2022-12-92 also matches the current regex and considers the column as date type.

Since other records of the same column will not necessarily have the date values, it throws exceptions related to date.

I am referring to Gridframework.js file, reference screenshot below. We would really appreciate if you can fix this issue.

Hello everyone,

We were able to replicate the issue and it was added to our backlog with high priority. Unfortunately, we cannot provide a workaround for this issue and we do not currently have an ETA, but I will let you know as soon as we have one.

Sorry for not being able to help more.

Jéssica M.

HI  Jéssica Mendes , Gonçalo Martins ,

Unmarking the solution, 

This issue was fixed in release 2.7.0 but it reproduced again in 2.9.0. attached sample for reference. Can you please check what was changed in the new release.

Regards,

Swapnil.

Data_Grid_Sample_with_Date_Column_Issue_v[Running_11_October_2022_06_15_49].osp

Hi @Swapnil 

You shared a solution with all assets. It would be more useful a sample oml with the steps to reproduce. 
I also tried to replicate it and everything seems to be working just fine.

Lately started getting "dt.getTime is not a function" error as well. Although my situation is different, but just in case will leave it here: 

My problem was that we used DateColumn to present a DateTime value, since time was irrelevant to the user. Once I changed the column to DateTimeColumn the error disappeared. It was working with DateColumn in previous version, but no big deal. 

Hi @Swapnil 

Just to provide an update, this should have been fixed on the previous release. 
Can you please validate it?

Cheers,
GM

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.