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!

Dynamic action to format value and submit of page

Tom vd DuinJun 26 2023

Hi all,

We're encountering a strange issue, on APEX 22.2 (reproducible on APEX 23.1 on apex.oracle.com, see below). On a page, we have a form region on a table. One of the fields in the form must be checked for validity and formatted in the database, after changing that value. The dynamic action is of type ‘Execute server-side code’ and has ‘Wait for result’ checked. In Items to submit and Items to return, that same item name is entered. That is all working great: The user enters a value and tabs out of the field and the dynamic action is started. While the dynamic action is running, the field is cleared and when the dynamic action is finished, the correct value was put in that field.

However, when a user enters a value in that item, and doesn't click out of the item but instead directly clicks on the ‘SAVE’ or ‘APPLY CHANGES’ button, the dynamic action is started and the page submit is also started short after that, but before the dynamic action is finished. Because the field is emptied during the Dynamic action, the field is submitted as empty. I was expecting that the dynamic action should finish before the page submit starts.

I made a test case here: customers (oracle.com). When you click on a customer, this behaviour is on the ‘Weird column’ item. The DA is a call to dbms_session.sleep(3), to make it extra clear that the process normally runs slow, and in the value of P4_WEIRD_COLUMN, a hyphen is added after the 1st character. When you don't tab out of the field after changing but directly click the submit button, the page is instantly submitted and the value you put into that item is emptied:

Dynamic action:

True action:

Comments
Post Details
Added on Jun 26 2023
3 comments
3,844 views