1
votes

I am currently working in Oracle Apex version 5.1.2.

I have four page items on a page in my application. One is a date picker, two are text fields, and one is for the ROWID of the table in the database. The type of the ROWID page item is "Hidden", and the ROWID is the primary key column in the table. Each page item has a "Source" of one of the columns in a single table I created in the database (it's the same table for each page item). I set this source in the Settings for each page item.

I have also created a button for the page. In the "Behavior" section of the settings for this button I have set the "Action" to "Submit Page" and the "Database Action" to "SQL INSERT action".

I have also created a "Process" for my page. The type of the process is "Automatic Row Processing (DML)". In the settings for this process, I have set the "Table Name" as the table that contains the columns I mentioned above, the "Primary Key Column" as "ROWID", and the "Primary Key Item" as "P31_ROWID", which is the name of the page item that has a "Source" of the ROWID in the table. I have set the "Supported Operations" for this process as Insert, Update, and Delete.

The problem: When I run the page and enter in data for the three page items and then press the "Submit Page" button I created, a new line item is added to the table in the database that contains the correct data that I entered into the page items. That works perfectly. However, when I press that "Submit Page" button, the data that I entered into the three page items disappears from the page items. So the data is added to the table in the database correctly, but the data disappears from the page items.

I would like for the data to remain in the page items after I press the "Submit Page" button. Does anyone know if/how I can achieve this?

Thank you in advance.

1

1 Answers

2
votes

Make sure, you have in Item attribute Source set Used as "Only when current value in session state is null"

Regard