Skip to Main Content

Oracle APEX PLSQL Dynamic Content - How to call procedure using html

Jasper TanglibAug 16 2021 — edited Aug 16 2021

Hi,
In Oracle APEX 20.2, I have a PL/SQL Dynamic Content that creates a Delete button. When the Delete button is clicked, I want it to execute a PLSQL procedure. This is how I did it based from other sites but it does not work.
DECLARE
CURSOR c_Forms IS
SELECT DISTINCT TE.FORM_ID, TE.ENVIRONMENT_NAME, TE.ENVIRONMENT_TAGS, TE.PROJECT_ID
FROM TC_ENVIRONMENT TE
JOIN TC_DATABASE TD ON TE.FORM_ID = TD.FORM_ID
WHERE TD.PROJECT_ID = :P13_PROJECT_ID
AND TD.PROJECT_NAME = :P13_PROJECT_NAME
ORDER BY TE.FORM_ID DESC;
BEGIN
FOR Rec_d IN c_forms
LOOP

-- Delete Button
htp.p('<form action="dev_schema.delete_form_id('|| Rec_d.form_id ||')" method= "GET">
<button align="right" class="t-Button t-Button--hot lto30524678744651345_0" type="button" id="dynamic-delete">
<span class="t-Button-label">Delete</span>
</button>
</form>
');

END LOOP;
END;
How to I call a procedure using html.
Any ideas or suggestions are appreciated.
- Jazz

Comments
Post Details
Added on Aug 16 2021
2 comments
489 views