view "empty" date fields

view "empty" date fields

  
I know that OutSystems doesn't support null values, but it is currently causing my users a headache. When the users are viewing the data on a form, it has several date fields, and if no data was put into those fields, OutSystems is putting the default of 01/01/1900 in the database and displaying that value when the data is viewed. Is there any way to display that field as blank on when the page is just showing the data (not editing)? I can figure the logic for determining whether or not the value is 01/01/1900, but I can't get the system to just display as a blank. Any help would be greatly appreciated. Thanks.

Josh

Hi,

On each field expression, on the table records, do that, if(tablerecords.list.Current.Date.Entity.DateField=NullDate(),"",tablerecords.list.Current.Date.Entity.DateField=NullDate), with this condition if date is null then the field is blank, else show the date.
I already have that problem and solve with this condiction.

Nelson Inácio

Thank you Nelson.  I didn't know that there was a NullDate function built into the system.  I never thought to look for one under the Data Conversion functions, I had only been looking in the Date Time functions.  This was a lot of help.

Thanks again.

Josh

Hi,

Just another information regarding these "null values" when you're using input fields. The input has a property "Null Value" that can be specified with NullDate() when you don't want to display (inside the input) the "1900-01-01 00:00:00" value. Basically if the input value matches the "Null Value" it does not appear.
You can check input documentation here.

Regards,
João Portela