Posts

Showing posts from February, 2015

Reset an Interactive Report (IR)

Image
To reset an IR back to the default settings, you may know you can go to the actions menu, and hit reset: If you inspect the apply button you will see it's calling gReport.reset() And there are a bunch of examples using this gReport object both for resetting the report and other IR functions. https://community.oracle.com/thread/2186564 https://community.oracle.com/thread/2595066 http://www.apex-at-work.com/2010/03/building-ir-filters-with-ajax-not.html http://www.apexninjas.com/blog/2012/06/the-greport-search-function-for-apex-interactive-reports/ The problem? This is not documented, and with APEX 5 supporting multiple IRs, this will no longer work. In your console, if you enter gReport, you will see that object no longer exists. The other technique you can use is the clear cache portion of the URL. According to the docs : To reset an interactive report in a link, use the string "RIR" in the Clear-Cache section of a URL. This is equivalent to the

APEX 5 API changes

Based on the current beta API docs:  https://docs.oracle.com/cd/E59726_01/doc.50/e39149/toc.htm , here is what's changed. APEX_APPLICATION_INSTALL Function GET_AUTO_INSTALL_SUP_OBJ added  Procedure SET_AUTO_INSTALL_SUP_OBJ added APEX_CUSTOM_AUTH LOGOUT procedure deprecated APEX_ESCAPE Function JSON added Function REGEXP added APEX_INSTANCE_ADMIN Procedure CREATE_SCHEMA_EXCEPTION added Procedure FREE_WORKSPACE_APP_IDS added Function GET_WORKSPACE_PARAMETER added Procedure REMOVE_SCHEMA_EXCEPTION added Procedure REMOVE_SCHEMA_EXCEPTIONS added Procedure REMOVE_WORKSPACE_EXCEPTIONS added Procedure RESERVE_WORKSPACE_APP_IDS added Procedure RESTRICT_SCHEMA added Procedure SET_WORKSPACE_PARAMETER added Procedure UNRESTRICT_SCHEMA added APEX_IR Procedure CHANGE_SUBSCRIPTION_EMAIL added Procedure CHANGE_REPORT_OWNER added APEX_LDAP Function SEARCH added APEX_PLUGIN_UTIL Function GET_ATTRIBUTE_AS_NUMBER added APEX_UTIL Procedure CLOSE_OPEN_D

APEX 5 creating regions on an existing page

Image
In APEX 4.2, it's nice and simple. Right click on the body node of the page tree view, and click create: After clicking create, you would be presented with all the possible region types: The rest is just a matter of following the steps. APEX 5, has a new page designer, and it took me a minute or so to figure out how to add a form region, since there seems to be a couple of options for adding regions! Firstly, in the centre column down the bottom of the page, you have a grid view of (almost) all the region types you can add. You can either drag them onto the visual layout of your page above, or right click and select where to add it to. The other option is on the left hand pane, right click and then select Create Region. . This will create a region with the type set as: "Static Content".  You then need to change the type on the right hand pane, and then fill out any region specific settings. At this point, it's probably

APEX 5 blob column uploads

Image
Existing behaviour In APEX 4.2, to upload a file into a BLOB column, there are two patterns for getting the file into your table. In settings, specify the storage type as: BLOB column specified in Item Source attribute Table WWV_FLOW_FILES  I tend to use method 2, and will be focusing on that pattern. This table can also be referred to with either: WWV_FLOW_FILES APEX_APPLICATION_FILES HTMLDB_APPLICATION_FILES Which you can see with the following query: select * from all_synonyms where table_name = 'WWV_FLOW_FILES' On your form page, whenever you have chosen a file to upload, and submit the page, the file will be uploaded into wwv_flow_files. The name column is the value assigned to the page item, so to fetch that particular file upload you would have something like: declare l_filerow apex_application_files%rowtype; begin select * into l_filerow from apex_application_files where name = :Px_ITEM_NAME; --Do somet

APEX 5 supporting file enhancements

Image
Existing behaviour In APEX 4.2, files can be uploading through shared components, and can either be associated with an application or workspace, and can be stored in either: Cascading Style Sheets Images Static Files These files can generally be found in the view: APEX_WORKSPACE_FILES Files are then referenced throughout the application by: #APP_IMAGES#<file_name> or #WORKSPACE_IMAGES#<file_name> Files can also be included in application exports, by creating an installation script for these files (to ensure they are available when deployed): Select  Create Scripts to Install Files under tasks when creating a new installation script: Then it's just a matter of selecting which files to include in the installation script New behaviour In the current form, this has changed to divide files up into application files and workspace files: This file uploader is not a multi-file uploader control, but it now has support for u