Sat. Dec 4th, 2021

Requirement: I have an Oracle APEX page. On that page I have button on click of which I want to show the Alert Message.

Sample screen is shown below:

Solution: For solution of the above requirement I will be discussing here two approaches. Off course there are many more approaches by which we can show the Alert Message.

Approach 1: Show Alert Message by using Alert Action

Step 1: Create a button with the below properties

  • Button Name: P3_SHOW_ALERT_MSG_DA
  • Label: Show Alert Message by using Alert Action

Step 2: Create the Dynamic Action and set the below properties:

  • Name: Show Alert Message by using Alert Action
  • Event: Click
  • Selection Type: Button
  • Button: P3_SHOW_ALERT_MSG_DA

Step 3: Set the properties of the True outcome as below:

  • Action: Alert
  • Text: Hello &APP_USER. I am called using Alert Action

Here &APP_USER. will dynamically pick the Login User Name.

Approach 2: Show Alert Message by using JavaScript

Step 1: Create a button with the below properties

  • Button Name: P3_SHOW_ALERT_MSG_JAVASCRIPT
  • Label: Show Alert Message by using JavaScript

Step 2: Create the Dynamic Action and set the below properties:

  • Name: Show Alert Message by using JavaScript
  • Event: Click
  • Selection Type: Button
  • Button: P3_SHOW_ALERT_MSG_JAVASCRIPT

Step 3: Set the properties of the True outcome as below:

  • Action: Execute JavaScript Code
  • Code:
apex.message.alert("Hello &APP_USER.. I am called using JavaScript");

Here &APP_USER. will dynamically pick the Login User Name.

Save and run the application. Thus, the ran application is shown below:

Let us now click on the “Show Alert Message by using Alert Action” button and with that throws an Alert with the message as “Hello PAUL.TECHNOTRAININGS@GMAIL.COM I am called using Alert Action

Let us now click on the “Show Alert Message by using JavaScript” button and with that throws an Alert with the message as “Hello PAUL.TECHNOTRAININGS@GMAIL.COM. I am called using JavaScript

Hence, the solution to our requirement.

If you like the post please comment, share, and do join me on Facebook. Please subscribe to my YouTube Channel for video tutorials.

Thanks & Regards,
Susanto Paul

 2,688 total views,  14 views today

By Susanto Paul

Susanto is an Oracle ACE, a qualified MCA, MBA, and a highly-skilled Senior Oracle Specialist. He is an enthusiastic Blogger and YouTuber who helps learners to solve their complex problems more efficiently. He has 9+ years of experience in multiple technologies like AWS, Oracle ADF, Oracle APEX, Oracle JET, Oracle VBCS, Oracle IDCS, Oracle PL/SQL, Oracle Integration Cloud, Java, JDBC, Servlets, JSP, Spring, Hibernate, HTML5, CSS3, JavaScript, TypeScript, NodesJS, Angular, MySQL, Oracle WebLogic Server, JUnit, JMeter, Selenium Web Driver, etc. He is a certified: Oracle Certified Professional Java SE 6 Programmer, Oracle ADF 11g Certified Implementation Specialist, Oracle Cloud Platform Application Integration 2020 Certified Specialist, Oracle Cloud Infrastructure Foundations 2020 Certified Associate, and Oracle Cloud Infrastructure Developer 2020 Certified Associate

Leave a Reply

Your email address will not be published. Required fields are marked *

satta king chart