Oracle Application Express (APEX) is a unique low code development platform that runs as a part of the great Oracle Database platform. Having the engine of APEX inside the Oracle Database grants it a premium privilege to access all the goodies and features that come with Oracle Database allowing the number one low code platform to be treated as a first-class citizen. No doubt this has opened the door so wide to unlimited possibilities.
The new Oracle Database 21c has been announced on the 13th of January 2021. With over 200 new innovations and features, Oracle Database is once again competing with itself.
The Always Free Autonomous Database 21c is being rolled to different regions. At the time of writing this post, it is available in four regions, your home region should be one of the followings:
My tenancy for example has the US East (Ashburn) Home Region. This can be checked in the upper right corner of the Oracle Cloud Console.
Create an Autonomous Database making sure that the version for the database is 21c.
Or you can use a previously created Autonomous Database that has the version 21c.
You can check the database version by visiting the Autonomous Database Details page.
Now that our database is ready, let's import the following Oracle APEX Application. Import the application into your APEX Workspace under the 21c Autonomous Database and run it.
You will notice that the application is quite similar to the generated Hands-On spreadsheet lab application. As a matter of fact, it is already built on top of the same dataset. Navigate to the "Project Tasks Report" page, which is Page 4.
You will find a select list item for listing the projects and a yellow button with the "Extend Project Tasks" label. Select the project "Email Integration" to view its tasks in the interactive report.
A couple of requirements arise for this application:
Let's examine the following PL/SQL code:
Let's run the above PL/SQL script in SQL Workshop.
Open the SQL Workshop => SQL Commands. Select "PL/SQL" for the Language. Copy and Paste the above PL/SQL code and click the "Run" button.
Our developer is so close to initiating the above code once the "Extend Project Tasks" button is clicked. He just needs to pass the page item of the currently selected project to the select statement. Simply replacing the 'Email Integration' with apex.env.P4_PROJECT will do the job. Open Page 4 and check the code available under the "Processing" tab for the "Extend Project Tasks" process.
For example, you can use the following code to get/set page item P4_PROJECT value:
On the page "Project Tasks Report" of the application, clicking the "Extend Project Tasks" button will extend a couple of tasks. The tasks where the status is "Closed" will not be extended as required.
The second requirement, asks us to develop a validation mechanism. The validation should be performed on Page 5, the Project Task form page.
Trying to change the owner of a closed task will lead to an error.
You can do a lot more with this feature. The following are some points you might be interested to explore.
The future of MLE has much more to offer for APEX developers. The inclusion of other server-side languages such as Python and the native loading of external NPM libraries will provide huge advantages to your team.
For further details watch this special edition for APEX OfficeHours.
Stay tuned, and happy APEXing.