Friday, December 11, 2020

Run Time Validation Check Without Page Submit In Oracle Apex


1.Ajax Callback :
 First we need to create Ajax Callback Process & give a meaningful name of this process. The Process like Bellow........... 

 Begin

    If :P9_QUANTITY is null Then

        htp.prn('Please Input Invoice Quantity.');

    Elsif :P9_QUANTITY =0  Then

        htp.prn('Sorry,Invoice Quantity Should be greater Than 0.');

    Else

        htp.prn('SUCCESS');

    End If;

End;


2. Dynamic Action : Create Dynamic Action in Item Level where we want to execute Validation.

apex.server.process('InvoiceQuantityValidation',
{
   pageItems : '#P9_QUANTITY'
}
,
{
   dataType : 'text', success : function(data)
   {
      if(data != 'SUCCESS') apex.message.alert(data);
   }
}
)

Wednesday, December 9, 2020

Digital Clock Create In Oracle Apex


Create Function In Function and Global Variable Declaration :

function showTime(){
    var date = new Date();
    var m=date.getMonth("MON");
    var dd=date.getDate();
    var y=date.getFullYear();
    var h = date.getHours(); // 0 - 23
    var m = date.getMinutes(); // 0 - 59
    var s = date.getSeconds(); // 0 - 59
    var session = "AM";
     if(h == 0){
        h = 12;
 }
   if(h > 12){
        h = h - 12;
        session = "PM";
    }
    
    h = (h < 10) ? "0" + h : h;
    m = (m < 10) ? "0" + m : m;
    s = (s < 10) ? "0" + s : s;
    
    //var time =dd +""+ m +"" + y +","+ h + ":" + m + ":" + s + " " + session;
    var time = h + ":" + m + ":" + s + " " + session;
    document.getElementById("MyClockDisplay").innerText = time;
    document.getElementById("MyClockDisplay").textContent = time;
    setTimeout(showTime, 1000);
   }

$(document).ready(function(){
 
    $(".t-Body-contentInner").prepend("<div id='MyClockDisplay' class='clock'></div>");
     showTime();
});

Inline :

body {
    background: black;
}
.clock {
    position: relative;
    left: 95%;
    transform: translateX(-50%) translateY(-50%);
    color: darkslategrey;
    font-size: 14px;
    font-family: Orbitron;
    font-weight: bold;
    letter-spacing: 4px;
}

Tuesday, December 8, 2020

Custom Authorization In Oracle Apex

 In this article we are going to discuss about Oracle APEX Authorization and Custom Authorization. Oracle Application Express (APEX) has two mechanisms for providing system security to be implemented on its application. The two mechanisms are authentication and authorization. Authentication mechanism  is implemented on login page. Authorization is used to create deeper security control. It might implemented on tab, page or region. The combination usage of authentication and authorization will create an application with confidence security.


On Oracle APEX we can create two kinds of authorization. We can create authorization with Access Control List (ACL) or with custom authorization.In this article we will discuss about custom authorization in oracle apex.

Page Level Authorization Query:

SELECT PAGE_NO FROM MENU_INFO WHERE MENU_NO IN(SELECT MENU_NO FROM MENUPREVS_DETAIL WHERE ROLE_NO=(SELECT USER_LEVEL FROM USER_INFORMATION WHERE LOGIN_NAME=:APP_USER)) AND
PAGE_NO=:APP_PAGE_ID;



Image File store outside of Oracle Database and show image into Apex Application

Directory Create : grant execute on utl_file to HRMS; CREATE OR REPLACE DIRECTORY STOCK_DIRECTORY AS 'C:\Program Files (x86)\Apache Sof...