Here are the steps for designing a success message that shows the column value in APEX:
- Go to the page where you want to add the success message and open the page in edit mode.
- In the toolbar, click on "Processing" and select "Processes".
- Click on "Create" to create a new process.
- In the "Process Name" field, give a name to your process.
- In the "Process Type" field, select "PL/SQL Code".
- In the "Process Point" field, select "After Submit - Success".
- In the "Process Text" field, write your PL/SQL code that retrieves the column value and assigns it to a variable. For example:
DECLARE
lcolumnvalue VARCHAR2(100);
BEGIN
SELECT columnname
INTO lcolumnvalue
FROM tablename
WHERE condition;
APEXUTIL.SETSESSIONSTATE('P1SUCCESSMESSAGE', 'The column value is ' || lcolumn_value);
END;
This code selects the column value from a table based on a condition and assigns it to a variable called "lcolumnvalue". Then it sets the session state of a page item named "P1SUCCESSMESSAGE" to a success message that includes the column value.
- Click "Save" to save the process.
- In the "Processing" section, click on "Page Processes".
- Find the process you just created and move it to the top of the list by using the up arrow button.
- Click "Apply Changes" to apply the changes to the page.
- Run the page and submit the form to see the success message with the column value.