I have a field defined in my table as DATE and want it to automatically populate with the current system date when someone access the update form in my APEX application. But the date doesn't update. It was working when I first added it开发者_JS百科, but now when you pull up the update page it only shows the date that's in the table.
In Oracle, a default on a column means that if a record is inserted into the table without mentioning that field, then use the default. My guess is that since the field is displayed on your page, you are writing NULL or spaces to it, so it is definitely included in the insert statement.
So you need to either take it off the page, add an update trigger, or even better, write a process in Apex to update it whenever the record is modified -- perhaps an After-Submit computation.
精彩评论