[OutSystems Data Grid] Datagid: on GetChangedLines date value format is not getting properly
Question
data-grid-reactive
Reactive icon
Forge component by Platform Maintenance

Hello Team,

I have Entity A in which I have Name and Date(Not datetime) attribute. I am using this entity data as source for datagrid.

On GetChangedLines event sometimes it is giving date as datetime and sometime as date. Whenever it is giving data in datetime format, not able to desacralized the data . Is anyone faced the same issue?


Thanks

Prajakta

Solution

Hello @Prajakta Roshankhede 

I assume you're using the ArranjeData, right?
If so, that's a known issue since on the extension we can't distinguish between Date and DateTime and, the platform doesn't have any metadata so we can do that distinction.
The only workaround is to use the JSONSerialize from the platform instead of the ArranjeData and we will not have an alternative in the short term.
Please let us know if this helps.

Cheers,
GM

Hello Its not working, if I set default value as yes while serialization  it is displaying null value as "1900-01-01" instead of empty

Hello.

Can you share a sample? I tried on my end and it worked so I would like to understand the difference.

Please refer attached sample for the same. If I set Serialize Default values as "No" issue still persist.


And for "Yes" Null value display as "190001-01" as per below image. Which I don't want i wan to display date field as empty/blank if it is null date

Thanks 

Prajakta Roshankhede

DataGridSample_v16.oml

Hello @Prajakta Roshankhede  

I just tried your sample and the issue is not happening as I expected.
Have you changed something on your end?
Please check the GIF attached.

Cheers,
GM

SampleGridSerialize.gif

Hello GM, 

Currently deserialization issue is resolved. But now second issue is if there is no entry against date of birth in db, on grid it is showing "1900-01-01"  which is wrong. It should display nothing. Please refer below image for the same

Thanks

Prajakta

Hello @Prajakta Roshankhede   

Thank was an issue that was fixed on the latest release (2.6.3):

Cheers,
GM

Are you sure Serialize default values set as "Yes" in your solution? Its still not working for me

Could you please upload your sample code, where it is working!!

Hello @Prajakta Roshankhede    

It's the same one you sent to me, but I attached it anyway.

Cheers,
GM

DataGridSample_v16.oml

Hi ,


I guess there is some misunderstanding here. let me put it again.

The solution you gave at the start where we make JSONSerialize to Yes, it solves the issue where in date starts to works but it starts showing null date(1900-01-01) on UI.

where in the solution you provided in the oml above , there you have JSONSerialize to No and thats why the null date does not show on UI.

I want a solution combining both where in JSONSerialize = Yes and Null date should not appear on UI?

I hope i am clear now? can you please help here

Thanks 

Prajakta

Which Data Grid version are you using?

Is there any solution to hide that nulldate("1900-01-01")?

Hello Prajakta,

Let me give you some updates. Currently, we have two issues. One happens with ArrangeData, where, sometimes, date values are being converted to datetimes and the other happens with JSONSerialize (default values) not making 1900-01-01 dates null. 

Regarding DataGrid, we can only fix ArrangeData, therefore we have an issue on our backlog to tackle this bug. It should be fixed by our next release.

We are sorry, but as of now, there is nothing else we can do to help you. 

okay, no problem.

Thanks for the explanation! 

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