Search This Blog

Monday, February 20, 2023

Database Value with Comma , Number Sign in URL by Link Error Solution

*** Column link data includes commas, number sign error 

*** Database Value with comma , number sign  in URL by Link type report column 

Solution : 

Just make the column link value like this  \#ColumnName#\  replace of  #ColumnName#

Saturday, February 4, 2023

Store Data into Browser local storage and sessionStorage

 Store Data into Browser local storage and sessionStorage. 

1.setItem(key, value) – Add key and value to sessionStorage or localStorage. 

localStorage.setItem("Order_id","12345"); 

or 

sessionStorage.setItem("first_name","Vikas"); 

 

2. getItem(key) – This is how you get items from sessionStorage or localStorage. 

 

localStorage.getItem("Order_id"); 

or 

sessionStorage.getItem("first_name"); 


3.removeItem(key) – remove the key with its value from sessionStorage or localStorage. 

 

localStorage.removeItem("Order_id"); 

or 

sessionStorage.removeItem("first_name"); 


4. clear() – Clear all from sessionStorage or localStorage. 

 

localStorage.clear(); 

or 

sessionStorage.clear(); 


 5. key(index) – Passed a number to retrieve the key of a sessionStorage or localStorage. 

 

localStorage.key(0); 

localStorage.key(1); 

or 

sessionStorage.key(0); 

sessionStorage.key(1); 


6. length – The number of stored items. 

 

localStorage.length; 

or 

sessionStorage.length; 

 

Merging New Json with Existing Json

Merging Json:

SELECT  json_mergepatch(Table.ExistingJsonColumn, '{"EXPANSE_DATA": {"MONTH" : { "JAN" : { "AMOUNT" : 2000}}}}') FROM Table

Rest Oracle Apex Developer User Password

  begin

 APEX_UTIL.RESET_PASSWORD (

   p_user_name      => 'User',

   p_new_password   => 'password',

   p_change_password_on_first_use=>false);

   end;

Get DDL of any Object in Oracle

SELECT DBMS_METADATA.get_ddl (<OBJECT_TYPE>, <OBJECT_NAME>, <SCHEMA_NAME>) FROM DUAL; --Must write everything in capital word


Stop Copy Pest From Your Application in Oracle Apex

1. Event > Page load.

2. Action > Execute JavaScript code.


$(document).ready(function () {
    //Disable cut copy paste
    $('body').bind('prevent cut copy paste', function (e) {
        e.preventDefault();
    });
   
    //Disable mouse right click
    $("body").on("contextmenu",function(e){
        return false;
    });
});


document.body.addEventListener('keydown', event => {
  if (event.ctrlKey && 'cvxspwuaz'.indexOf(event.key) !== -1) {
    event.preventDefault()
  }
})

Get a Hidden Item Value From Frontend in Oracle Apex

Get a Hidden Item Value From Frontend

Set Value inti Hidden Item From Frontend

1. Open an Apex page and Right click on the mouse then click on Inspect

2. Then click on Console.

3. Now put the javascript to get value or set value from the item. Exp:
apex.item("HiddinItemName").getValue();

apex.item("HiddinItemName").setValue();



you can see the hidden value.

403 Forbidden Access to the procedure named: apex is denided / www_flow.accept is denied

403 Forbidden  

Access to the procedure named: apex is denied

403 Forbidden  

Access to the procedure named: www_flow.accept is denied



We faced this issue in our running oracle apex application. It was Oracle Apex 20.2 and ORDS 17.4 

Here is the solution from our side:

Just go to the schema browser and open the function. Then edit the function like below. 

create or replace function wwv_flow_epg_include_mod_local(

    procedure_name in varchar2)

return boolean

is

begin

    --return false; -- remove this statement when you modify this function

    --

    -- Administrator note: the procedure_name input parameter may be in the format:

    --

    --    procedure

    --    schema.procedure

    --    package.procedure

    --    schema.package.procedure

    --

    -- If the expected input parameter is a procedure name only, the IN list code shown below

    -- can be modified to itemize the expected procedure names. Otherwise, you must parse the

    -- procedure_name parameter and replace the simple code below with code that will evaluate

    -- all of the cases listed above.

    --

   IF upper(procedure_name) IN (‘apex’ 

   --... other procedures already listed

   )

   THEN

      return TRUE;

   ELSE

      return FALSE;

   END IF;

end ;

wwv_flow_epg_include_mod_local;



Here are some other discussions and solutions that I get over the internet.


https://halimdba.blogspot.com/2023/02/403-forbidden-access-to-procedure-named.html


https://joelkallman.blogspot.com/2016/07/securing-application-express-when-using_24.html


https://www.promatis.at/en/2022/07/13/lessons-learned-while-upgrading-apex-and-ords-to-22-1/





Restrict File Upload by File Type in Oracle Apex

If you want to restrict file upload by file type/extension/format you can follow the below steps.  Goto File Browser Item --> Advanced --...