Page 1 of 1

date field changing on record save

Posted: 2014-12-02 07:05
by mgoetze
Hi everyone,
I am experiencing a strange bug related to date fields. I have a date field which is
Data type: date
Default: <%%creationDate%%>
Read Only box is checked...
The problem is that every time we go in and edit the record and click Save, the date field changes to today's date. It seems AppGini is mixing up created date with edited date. I've check all our settings 10 times but I cant seem to fix this. Has anyone seen this or does anyone have any advice on how I might fix this? Any advice or possible solutions are greatly appreciated.

Thank you,
Mark

Re: date field changing on record save

Posted: 2014-12-02 09:27
by Bertv
Hi,
I have the same problem a read-only date field.
Other read-only fields don't exist in the generated update sql, but read-only date fields do. but the value of the data array is empty.
So an read-only date field without a default has after an update of another field an null value.

My solution: a before update trigger with:

begin
set new.rms_xxxdate = old.xxxdate;
end;

Re: date field changing on record save

Posted: 2015-02-24 18:13
by rmloehmann
I had this issue and had to use the <%%creationDateTime%%> set as a read only field instead of just creationdate to get it to work properly.