1 Reply Latest reply: Aug 6, 2013 12:33 PM by Howard (... in Training) RSS

    How to insert row where DB date field has default value.

    Howard (... in Training)

      APEX 4.1, Oracle 11.2

      I'm trying to insert a row using "javascript:addRow();" where the report query is an SQL Query (Updateable Report).

      1)  Several of the fields are display-only with defaulted values.

      2)  No problem with the VARCHAR2 fields.

      3)  And if RUN_DT is a text field, the insert works.

      4)  But I get errors when trying to make RUN_DT (DD-MON-YYYY) display-only and default it to P63_RUN_DT.  I display P63_RUN_DT so I see it is correct.

       

      Now, this is not a new question.  See:

      Error inserting sysdate with time in tabular form region  https://forums.oracle.com/thread/2551916  (Not answered)

      Date value in tabular form  https://forums.oracle.com/thread/2478358 (Not answered)

      Help! Unable to set default date value for Tabular form DB date field! https://forums.oracle.com/thread/2473208  (Not answered)

      Default Value Date Picker Field https://forums.oracle.com/thread/2468973  (Not answered)

      Tabular Form Default Value PL/SQL https://forums.oracle.com/thread/2464192  (Not answered)

      Display 1st region invoice date into tabular form invoice date column. https://forums.oracle.com/thread/2458561  (Not answered)

      Default System date and time in Tabular form https://forums.oracle.com/thread/2449615 (Not answered)

      Setting default value of Tabular form item is not working https://forums.oracle.com/thread/2396024 (Not answer)

      apex tabular form https://forums.oracle.com/thread/2337098 (Not answered)

       

      Various folks recommended using Default PL/SQL and SYSDATE when SYSDATE was the desired default value.  That worked for some and not for others.  I could not get it to work for me.  The errors I receive are "•Column must have a value. (Row 1) " and "ORA-01410: invalid ROWID".   I believe the ROWID error is an example of spurious error cascade caused by the RUN_DT problem.   I believe it will disappear once the RUN_DT problem is solved.

       

      I will try to replicate on apex.oracle.com

       

      Thoughts?

       

      Howard