2 Replies Latest reply on Feb 1, 2013 7:31 PM by Matthew Morris

    Hidden Field

      Hello All,

      I am new to APEX and having an issue with computation. I have an item on a page that is hidden. I would like to populate this field with the system date. I have created a computation that runs select sysdate from dual statement. But when I run the application I get an error message stating that I can;t insert null into this field.

      Any ideas?
        • 1. Re: Hidden Field
          Ramesh P, Oracle APEX Developer
          Let me explain in simple.

          Create an hidden item p1_date

          Create a computation in the page processing section that is the middle block of the frame work

          SELECT SYDATE FROM DUAL on the item P1_DATE and it should work.
          • 2. Re: Hidden Field
            Matthew Morris
            Populating an item like this from the page processing section means that the value won't be placed in the item until the page is submitted. If the value is needed before then, the OP would be out of luck. Besides that, it's more complex than is really required.

            Set the 'Source Used' of the hidden item to 'Always, replacing any value in session state'
            Set the 'Source Type' to PL/SQL Function Body
            Set the 'Item Source Value' to:
              RETURN SYSDATE;
            If you want the date to be in the field in a specific format, then use TO_CHAR in your RETURN statement.