Browsing "Older Posts"

APEX-AT-WORK no image

Automatic File Upload filename can't be null

Von Tobias Arnhold → 8.30.2011
I used the automatic file upload feature of APEX and got always an error that either filename or mimetype column of my file table can't be null.

APEX probably saves first in FLOW_FILES and then updates my tables. If I take the column "NOT NULL" limitation away it works fine.

If you want to know how you configure automatic file upload in APEX look here:
File Browser in APEX 4 with BLOB column specified in item source attribute
APEX-AT-WORK no image

Restore package source code

Von Tobias Arnhold →
If you need to restore your changed or dropped package then use this select to retrieve the lost information:
select text
 from dba_source
   as of timestamp systimestamp - interval '10' minute
 where name='MY_PACKAGE'
 order by line;

For more information read this blog post of Uwe Hesse:
Retrieve old versions of procedures with Flashback Query

Btw: Have you seen the great blog post from Matt how you can use your own interactive images in APEX: APEX Plugin – Body Chart
APEX-AT-WORK no image

IRR: UILayout issue

Von Tobias Arnhold → 8.17.2011
If you use the UILayout plug-in for APEX with Interactive Reports you will see some issues inside the action menu. The "Rows Per Page" and the "Format" menu will be positioned above the main action menu.

To fix this use the following js snippet with a dynamic action or add it inside your page header:
$('.dhtmlSubMenuS').mouseover(function() {


    left: $('#apexir_ROWS_PER_PAGE_MENU').position().left + 200 + "px"



    left: $('#apexir_FORMAT_MENU').position().left + 200 + "px"



Create a Dynamic Action which fires on the refresh of your Interactive Report and executes the JS code. Run it also on page load.

I will fix it in one of the next versions of the plug-in.

IRR: Remove single rule

Von Tobias Arnhold → 8.09.2011
If you want to remove easily a single rule inside your interactive report then use this javascript code snippet:

$('a:contains(Vorname ist Null)').parent().parent().remove();

Customized IRR example:
/* Remove Highlight rules */




/* remove filter */

$('a:contains(My Column filter = \'FILTER\' )').parent().parent().remove();

/* Remove named report */

$('a:contains(Gespeicherter Bericht = \"My filtered report\")').parent().parent().remove();

/* Remove group label text */

$('#apexir_SAVED_REPORTS optgroup[label="Standard"]').attr("label","");

$('#apexir_SAVED_REPORTS optgroup[label="Öffentlich"]').attr("label","");

/* Remove Control Panel Control and make it always active */



/* gReport.toggle_controls($x('apexir_CONTROL_PANEL_CONTROL')); */

APEX-AT-WORK no image

Check if part of a string has only number values

Von Tobias Arnhold → 8.06.2011
I had the requirement to find out if a part of a string includes only number values:

Table: My_Test_String_Table
Column: T_STR
String 1: TIGER031STD
String 3: TIGER999STD

Now I need to find all rows where position 6, 7 and 8 is a number value.


select * from My_Test_String_Table
decode(REGEXP_INSTR (substr(T_STR,6,3), '[^[:digit:]]'),0,'YES','NO') = 'YES';

Returns String 1 and 3!

Take a look into this forum post to find more examples:
APEX-AT-WORK no image

IRR: Get current report selection

Von Tobias Arnhold →
With Interactive Reports you are able to save several views of one report source.
- Default
- Public
- Private

Your end user can easily choose from those saved reports.
If you need to know which the currently viewed report is then you can use this little js code snippet:
'ID: ' + 
$('#apexir_SAVED_REPORTS').val() + 
', Text: ' + 
$('#apexir_SAVED_REPORTS :selected').text()

Try it inside a dynamic action!