Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Date / Time Handling on Form

Steve RoachFeb 27 2020 — edited Feb 27 2020

Hi Guys,

I have built a small example app as a demo for this:

https://apex.oracle.com/pls/apex/f?p=115724

Username: demo

Password: demodemo

It is a report / form on a single table with 3 columns, one of which is a date. The form has two dropdown items for time entry, one for hours (0-23), and one for minutes 0-55 in 5 minute increments). The date field will store 01-JAN-1900 HH24:MI:00 (1st Jan 1900 followed by the hour:minute, the seconds part is always 0). I've also set up an item for the concatenated time (HH:MI) which would be a display field. The form can be used to create, delete and update rows as per out of the box functionality.

I've set up Dynamic Actions on the non-database items to move the times around and finally put the correctly formatted date:time into the database item (P3_TIME_ONLY_COLUMN).

I created a Before Header Process / PL/SQL Code that uses the id PK of the row to query the database and populate the UK item (P3_NAME) and the 2 time dropdowns. The DAs on the latter cascade these date components to the remaining items. If the ID is null, the form is in create mode and these items are set to their defaults.

This seem to work well apart from when the form is started for an update. Whatever data is enter, on clicking the [Apply Changes] button, the form throws an ORA-01403: no data found error. I'm getting no love from the information screen as to what query is throwing that error. Please go to the app and give it a try.

The first question is; is this the right approach for this type of form that needs some fields populated for an update?

Secondly, any idea what is causing that error message?

Comments
Post Details
Added on Feb 27 2020
2 comments
631 views