Oracle Application Blog

Conditional Alert / Comments on Hover

Conditional Alert / Comments on Hover is common requirement, In Old days, it is common to use drill-down pop-up user has to click and view comments and after that he has to close it. If he had 100 records it takes time to click and check on it. Instead of Click, It is better to visualize comments / alert on hover. Step:1: In Link / Element Attributes, we can call function on mouse hover using javascript as follows: onmouseover=”fun_status(#DELIVERY_ITEM_ID#,#DELIVERY_PDVD_ID#);” Step:2: In function we will check our condition and display it conditionally. It is simple, But we used it for field locks as user can be restricted to click on link when other user is using it , during hover itself we will alert him and restrict. Following javascript is used to check whether particular field is locked or not and we will conditionally alert them or allow in accordance to condtion function fun_status(a,b) {    var get = new htmldb_Get(null,$x(‘pFlowId’).value,               ‘APPLICATION_PROCESS=AP_DEL_OUTPUT_CHECK’,0); get.add(‘AI_PDVD_ID’,a); get.add(‘AI_DELIVERY_PDVD_ID’,b); gReturn = get.get();  var x=gReturn; x = x.trim();     //alert(x); if (x != “Not Exists”)     {        $(“#alert”).html(“Field has been locked by <b>”+x+”</b>”);        $(“#alert”).dialog({modal:true,resizable: false,minHeight: 105,width:380,dialogClass: ‘testclass’});      } }  $(‘#alert’).on(‘dialogclose’, function(event) {         $(“#alert”).dialog(“destroy”);             }); Output:

Read More

Comments Differentiation in Oracle APEX

Comments Differentiation is some recent requirement as new advancements in CSS been implemented. Customer requires differentiation in Image when some comment been added. It has been  implemented with css and little Jquery. Step:1: Include following icon tag in Link Text in report column attributes <i class=”fa fa-comments-o fa-3x icon-grey” aria-hidden=”true”></i> Step:2: Create hidden column to find comments exists for particular row. Step:3: Include following JQuery for color differentiation:        Create Dynamic Action as Execute Javascript Code        Event : After Refresh and Page Load        $(“#report_del_item .t-Report-report td[headers=’GENERAL_COMMENTS’]”).each(function(){ var c = $(this).children(“input[name=’f17′]”).val(); if (c.length != 0) {      $(this).closest(‘tr’).find(“td[headers=’GENERAL_COMMENTS’] a”).children(“i”).css({“color”:”red”}); } }); #report_del_item  – Static Id of Report. td[headers=’GENERAL_COMMENTS’] – Represents General Comments Column $(this).children(“input[name=’f15′]”) – Represents general comments hidden column , Children been specified as all hidden columns will be children to last visbile/display column. .closest(‘tr’)  – Finds closest table row <tr> .children(i)   –  Represents child icon tag inside parent general comments .css         – Adds style element to selector Output: You can notice General Comments to see Comments Differentiation 

Read More

Blank Row Restriction in Oracle APEX

Blank Row Restriction is to avoid unwanted addition of rows in detail report (tabular Form) when a blank row already exists. This functionality can be achieved by Javascript. It is simple but can be reused everywhere. Step:1: Change Add Row Button action as “Defined by Dynamic Action” Step:2: Create Dynamic Action with action as Event : Click Button Action : Execute Javascript Code Code : var i = 1; var count = 0; var c; while (i != 0) { b = “000” + i; //alert(b); b = pad(i,4);                     // calls function pad and pads 4     zeros a = $x(“f05_” + b).value;           // id of mandatory column //alert(a); if (typeof a === “undefined”) { i = 0; } else { c = a.trim(); if (c.length == 0) { count = count + 1; } else { count = 0; } i = i + 1; } }…

Read More

OAF Personalization in Special Information Type

             We got a requirement to enable only the specific SIT to be displayed in custom responsibility. Generally when the user clicks on Standard MSS responsibility,…

Read More

Query to get Unearned Revenue Error details selec…

Query to get Unearned Revenue Error details select  customer,         account_number,         invoice_no,         line_no,         accounting_rule_name,  …

Read More

/*Sample script to fetch the Receipt Register alon …

/*Sample script to fetch the Receipt Register along with its TDS and WCT details */ SELECT   apps.gl_flexfields_pkg.get_description_sql                        …

Read More

/* Sample script to fetch the Invoice Register with tax details */

      /* Sample script to fetch the Invoice Register with tax details */ SELECT   glcc.segment1, glcc.segment2, glcc.segment4, glcc.segment5,          apps.gl_flexfields_pkg.get_description_sql        …

Read More

Query to fetch Customer Statement of Account Detai …

Query to fetch Customer Statement of Account Details SELECT   rc.customer_name “Customer_Name”,          rc.customer_number “Customer_Number”, hou.NAME operating_unit,          DECODE (ps.CLASS,        …

Read More

Query to get the details of invoice with tax info…

Query  to get the details of invoice with tax information’s select ctx.customer_trx_id,        case           when (    hrloc.address_line_1 is not null    …

Read More

Add Row on the Top in the APEX Tabular Form

 Step 1: Give the Add row button, Action when Button Clicked as Defined by Dynamic action. Step 2: Create a Dynamic action with Event as Click, Selection Type as Button, Button as Add_row and true action as Execute JavaScript Code with Fire on Page load No and add code as addRowTop(); Step 3: Create a function in page header as function addRowTop()  { apex.widget.tabular.addRow(); apex.jQuery(apex.widget.tabular.gTabForm).find(“tr”).last().insertBefore(apex.jQuery(apex.widget.tabular.gTabForm).find(“tr”).first()); } 

Read More