Thursday 1 July 2021

APEX_SERVER_PROCESS and clob processing

Fetch CLOB size text on page load and submit page

Oracle APEX 32k size limitation workarounds

Since I had to do this few times around already this is for reference and reminders
Ask is to load and process the same text like JSON data on your APEX page that exceeds typical 32K in size. 
Let's first tackle getting the JSON data from a database to be parsed with JavaScript. 
In example of processing a payload on HansOnTable example I wrote earlier about. 
In my previous post I used APEX page item to store and process the data which obviously came with limitations.
Alternative approach getting the data into the initialization code would be to have  JS code: 
Where not so common method of fetch(url) is used to read the JSON data from application process app_get_clob:
This is then used in JS initialization code. 
Notice that we are here downloading the clob as a blob to bypass size issues.
Sweet, now that we changed the data we want to update our database table in a similar fashion. 
In the save process we will use apex.server.process and p_clob_01 parameter option.
where we then access this ajax passed parameter using
Similarly here we are using g_clob_01 vs g_x01..10 which typically get used.
This way we should be more than capable of loading large data loads and process them when data gets submitted back by the end users. 
Happy APEXing,
p.s. example of the code can be found on