Posts

Showing posts from 2021

Custom alert and confirm box in APEX with help of jquery

Image
 Custom alert and confirm box in jquery  Step 1)  Define Function at Function and Global Variable Declaration  function yesnodialog(button1, button2,button3, element){   var btns = {};   btns[button1] = function(){       element.parents('li').hide();       $(this).dialog("close");   };   btns[button2] = function(){       // Do nothing       $(this).dialog("close");   };   btns[button3] = function(){       // Do nothing       $(this).dialog("close");   };     $("<div></div>").dialog({     autoOpen: true,     title: 'Condition',     modal:true,     buttons:btns   }); }    Step 2 ) Call the function wherever need by passing parameter  yesnodialog('Yes','No','Cancel',$(this));  

DBMS_CLOUD.COPY (Upload Excel/CSV Data into Table on cloud)

  1) Create Credential on Cloud  2) Login with sql developer 3) Create table in my case TVEH 4) Perform the below  procedure  begin DBMS_CLOUD.COPY_DATA(     table_name =>‘TVEH’,     credential_name =>‘DEV’,     file_uri_list =>‘ https://objectstorage.us-ashburn-1.oraclecloud.com/n/<name space name >/b/BigData/o/file_name.csv ’,     format => json_object(‘type’ value ‘CSV’,‘ignoremissingcolumns’ value ‘true’,‘rejectlimit’ value ‘100’)  );

display password column with asterisk on Interactive/Classic Report on APEX

Image
  1) Create Query  select USER_ID,        USER_NAME,        '<input type="password" value="'||PASSWORD||'" readonly="readonly"/>' PASSWORD   from USERS_TBL 2) Go to IR Region and Select the PASSWORD column property--Switch off( Escape special characters) 3) Go to CSS - inline input[type=password]{ -webkit-transition: all 0.30s ease-in-out; -moz-transition: all 0.30s ease-in-out; -ms-transition: all 0.30s ease-in-out; -o-transition: all 0.30s ease-in-out; outline: none; padding: 3px 0px 3px 3px; margin: 5px 1px 3px 0px; border: 0px solid #DDDDDD; } Out Put 

Oracle APEX Page for File Upload & Download From Directory Instead of Table

Image
File Upload & Download from Directory Instead of Table  1) create table testt1  ( DOCNO number        FILE_NAME varchar2(250),        FILE_MIMETYPE varchar2(250),        FILE_CHARSET varchar2(250) ) 2)  Conn as sys User    Sql> create or replace  directory TEST as 'C:\Test';   Sql>  Grant read,write on directory to <user> 3)    create or replace view v_testt1 as (        select         DOCNO,        FILE_NAME,        FILE_MIMETYPE,        FILE_CHARSET,          TO_BLOB((select BFILENAME('TEST', File_Name ) from dual  )) DOCIMG ,        sys.dbms_lob.getlength( BFILENAME('TEST', case when FILE_MIMETYPE is not null then         File_Name end)) Download from testt1       ...

Send Email of Dynamic Excel by Automation in Oracle APEX

  declare l_highlights apex_data_export.t_highlights; l_context apex_exec.t_context; l_export apex_data_export.t_export; l_print_config apex_data_export.t_print_config; l_id NUMBER ; l_error_message cis_errors.ERROR_MESSAGE% type ; blob_content clob ; l_program_name varchar2 ( 250 ) := 'Automation :Premium Summary' ; begin l_context := apex_exec.open_query_context( p_location => apex_exec.c_location_local_db, p_sql_query => 'select rownum as "SR.NO", PR_LOCATION as "LOCATION", BR_NAME as "LOC NAME", THISYEAR_CMP_SALES as "THISYEAR_CMP_SALES", LASTYEAR_CMP_SALES as "LASTYEAR_CMP_SALES", THISYEAR_TP_SALES as "THISYEAR_TP_SALES" , LASTYEAR_TP_SALES as "LAS...

WhatsApp Integration with Oracle APEX

Image
1) Get API URL From Register WhatsApp API Provider 2) In my case https://app.chat-api.com/ 3) Login with your account or register for new account  4) Add new Instance  5) Give Instance Name and Reboot  6) Open your WhatsApp in mobile --> Go to Setting --> WhatsApp Web/Desktop  and Scan QR code for Activate your business account with instance  7) Copy Your API  8) Go to Oracle APEX , go to sql Workshop and create procedure to call the API 8 ) Call the procedure      Mobile No = Should Start with Country Code       begin     whatsapp_send (                                   l_mobileno => '968XXXXX',                                   l_message => 'Hello'            ...

The username or password for the connection pool named |apex||, are invalid, expired, or the account is locked

  1. Execute the following command from SQL Plus as the SYS user:  Conn sys/Pass@xe as sysdba  (connect as container if 12c then  ALTER SESSION SET container = CDB$ROOT;) Alter user ords_public_user identified by xxxx; ALTER USER ORDS_PUBLIC_USER ACCOUNT UNLOCK; Connect as PDB Conn sys/Pass@xepdb1 as sysdba (if 12c  ALTER SESSION SET container = PDB1;) Alter user APEX_PUBLIC_USER identified by xxxx; Alter user APEX_REST_PUBLIC_USER identified by xxxx; Alter user APEX_LISTENER identified by xxxx; 2. Unlock the users: ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK; ALTER USER APEX_REST_PUBLIC_USER ACCOUNT UNLOCK; ALTER USER APEX_LISTENER ACCOUNT UNLOCK; ALTER USER ORDS_PUBLIC_USER ACCOUNT UNLOCK; 3. Now create a profile for the APEX related users: Create profile apex_public_profile limit password_life_time unlimited; 4. Assign the profile to the APEX users: alter user apex_public_user profile apex_public_profile; alter user apex_rest_public_user profile apex_public_pr...

How to store the selected Rows Column value into Array in Interactive Grid

 How to store the selected Rows Column value into Array in Interactive Grid   In Oracle Forms we performed the following coding  /*GO_BLOCK ('TEST'); First_record ; While system.last_Record <> true  loop     if :test.status ='Y' then      :Master.Nbt_Sel :=:Master. Nbt_Sel + :test.docno ;     end if; next_Record; end loop;*/ How to achieve in Oracle APEX Interactive GRID Create Download button grid --> DA--Java Script  function Download()    {   var widget = apex.region("POR01").widget();   var grid = widget.interactiveGrid("getCurrentView");   var model = grid.model;   var selectedRecords = grid.getSelectedRecords();    var selRecords = {   "rows": []   };   var selRecordsJSON;       if (selectedRecords.length > 0)        {          if (confirm("Do you want to update comm...

how to update the record of Selected row in Interactive Grid - Interactive Grid

how to update the record of Selected row in Interactive Grid ,  In Oracle Forms :- its very easy to achieve the below functionality with help of  /*GO_BLOCK ('TEST'); First_record ; While system.last_Record <> true  loop     if :test.status ='Y' then      update statement      end if; next_Record; end loop;*/ Now see in APEX Interactive GRID Create Update Button on GRID Region --> Create DA with JavaScript Code     var i, records, record, sal, model,         view = apex.region("emp").widget().interactiveGrid("getCurrentView");     if ( view.supports.edit ) { // make sure this is the editable view             percent = percent / 100;         model = view.model;         records = view.getSelectedRecords();  if ( records.length > 0 ) {             for ( i = 0; i < records...

The database user for the connection pool named |apex|rt|, is not able to proxy to the schema named XXXX. This could be a configured restriction on the maximum number of database sessions or an authorization failure.

Image
  The database user for the connection pool named |apex|rt|, is not able to proxy to the schema named XXXX. This could be a configured restriction on the maximum number of database sessions or an authorization failure. Solution :-   alter user XXXXX  grant connect through APEX_REST_PUBLIC_USER;

Signature in Oracle APEX Page

Image
 Signature in APEX Page  Special Thanks to Daniel Hochleitner Download Plug In:- https://github.com/Dani3lSun 1) Create Table CREATE TABLE  "SIGNATURE"     ( "COMPCD" VARCHAR2(2),  "LOCNCD" VARCHAR2(2),  "BRCD" VARCHAR2(3),  "DEPTCD" VARCHAR2(3),  "DOCNO" NUMBER,  "DOCDT" DATE,  "DOCTYP" VARCHAR2(2),  "REFCD" VARCHAR2(6),  "NETVALLC" NUMBER(17,3),  "NETVALFC" NUMBER(17,3),  "FILE_NAME" VARCHAR2(250),  "MIME_TYPE" VARCHAR2(250),  "DOCIMG" BLOB,  "CRTDT" DATE,  "CRTUSER" VARCHAR2(6)    ) / 2) Import Plugin  region_type_plugin_de_danielh_apexsignature.sql 3) Import Static file  apexsignature.js , apexsignature.min.js, signature_pad.js, signature_pad.min.js 4)  Copy the staic file path to  UserInterface -- Java Script  #APP_IMAGES#apexsignature.js #APP_IMAGES#apexsignature.min.js #APP_IMAGES#s...

Download Custom Excel by Select Query on button click ( without IR/IG Report )

Image
Note 1:- Pre-rendering only advisable if you want to generate excel from Interactive Grid Page other wise below process you can directly call from submit Page --> process  Note 2:-  If calling from submit Page (button) --> then make sure Reload on Submit should be "Always" on page property  1) Create Blank Page --> Pre-Rendering --> Before Header --> Process --> Download Excel  declare     l_highlights     apex_data_export.t_highlights;     l_context        apex_exec.t_context;     l_export         apex_data_export.t_export;     l_print_config    apex_data_export.t_print_config; begin     -- apex_data_export.add_highlight(     --     p_highlights          => l_highlights,     --     p_id                  => ...

ORA-27492: unable to run job "APEX_200200"."ORACLE_APEX_MAIL_QUEUE": scheduler unavailable

1)  BEGIN  apex_mail.send(p_to   => 'abc@gmail.com'/*l_to_addr*/,                                    p_from => 'def@gmail.com'/*l_from_addr*/,                  p_subj => 'Test33344',                  p_body => 'Service Request Note:- This is a system generated Email. Please DO NOT REPLY to it.'); APEX_MAIL.PUSH_QUEUE; END; Lets assume you are getting ORA-27492 Unable to run job "APEX_200200" ORACLE_APEX_MAIL_QUEUE scheduler unavailable error then perform following two line code 1) Login as sys/ dba without container  2)  alter system set job_queue_processes = 100; 3) connect now sys/<>@container as sysdba 4) Perfrom  begin APEX_MAIL.PUSH_QUEUE; end;