I'm using apex 5.1, universal theme and 11g DB.
I have a page with file browse item with storage type = table APEX_APPLICATION_TEMP_FILES.
I can create a page process to read this file and it works fine but in my case I need to evaluate the pl/sql code return value.
I created apex.server.process instead of the page process so I can look at the result and call a MODAL page
Below is the JS code but this process it asynchronous even if I put the async: false.
Please note that the eval calls a modal page and after process branch cannot call a modal page I'm getting an error and this is another reason I need JS.
Also the file is NOT visible unless its on the page process.
Thanks!
apex.server.process('ClickProcess', {}, {
async:false,
success: function(gReturn) {
if (gReturn.substr(0,1) == '0')
{
alert(gReturn.substr(1));
}
else
{
eval(gReturn.substr(1));
}
},
dataType: "text"
})