Condition based oracle apex column URL (Report Page)

Please find the below code for your reference and modify it.

select (case when order_status =’COMPLETED’ then
‘<a title=”Click here to generate the report” class=”t-Button t-Button–simple t-Button–small t-Button–hot t-Button–stretch” href=”‘||
apex_page.get_url(
p_page        => 12,
p_clear_cache => 12,
p_items       => ‘P12_ORDER_ID,P12_STATUS’,
p_values      => ORDER_ID||’,’||STATUS)||'”>GENERATE REPORT</a>’
else
NULL
end)  “REPORT”
from order
Advertisements

Open Inline Dialog and Close Inline Dialog in Oracle Apex

Questin : Open Inline Dialog and Close Inline Dialog in Oracle Apex
Answer :

  1. Create New region
  2. Select the Region — > Go to the template and select the inline dialog type
  3. Create the button (openModal) for other region, because when you are click the openModal button it will open the inline dialog within the page.
  4. Select the Inline dialog region and put the Unique STATIC ID in Advance property
  5. Now write the code for open modal dialog
  6. Select the Open modal button and select the Behavior –> Select the Redirect URL in the list and paste the below code
  7. javascript:openModal(‘GENERATE_BOOKING’);
  8. GENERATE_BOOKING is the static id for inline dialog region
  9. Save and run the page now the inline dialog will open
  10. Create the close button for inline dialog region and select the button behavior — > and select the redirect url from the list and paste the below code
  11. javascript:closeModal(‘GENERATE_BOOKING’);

Please try the code and provide your comments here.

Apex collection column 2,3,4 etc and above value not getting properly

Apex collection column 2,3,4 etc and above value not getting properly in the classic report, we follow the below method to solve the issue.

1. Write the sql query for below

apex_item.checkbox2( p_idx =>1, p_value => '~'||COLUMN1 ||'~'||COLUMN2||'~', p_attributes => 'class="your_class_name" id="f01_'||ROWNUM||'"', p_checked_values => :P1_ITEM_ID_LIST, p_checked_values_delimiter => ',')

2. Create collection

BEGIN
apex_collection.CREATE_OR_TRUNCATE_COLLECTION ('YOUR_COLLECTION_NAME');
COMMIT;

for i in 1..apex_application.g_f01.count loop
apex_collection.add_member(
p_collection_name => 'YOUR_COLLECTION_NAME',
p_c001 =>(regexp_substr(apex_application.g_f01(i), '([^~]*)(~|$)', 1, 2, NULL, 1)),
p_c002 =>(regexp_substr(apex_application.g_f01(i), '([^~]*)(~|$)', 1, 3, NULL, 1))
);
end loop;
COMMIT;
END;

the checkbox2 value column1 and column2 values are stored in single checkbox2 value, we are inserting the data we will split the column1 and column value for this type.

Upgrading Oracle Application Express within Oracle Database 11g Express Edition (XE)

Oracle Database 11 g Express Edition (Oracle XE) includes Oracle Application Express release 4.2.6.00.03. It is strongly recommended that you upgrade to the latest release of Oracle Application Express to take advantage of all the latest features.

How to Upgrade

To install the latest version of Oracle Application Express in your Oracle Database XE, first downloadthe latest version of Application Express from the Oracle Technology Network.

1. Unzip the downloadloaded zip file:

  • Linux: Unzip <filename>.zip
  • Windows: Double click <filename>.zip in Windows Explorer
  • [Note: You should keep the directory tree where you unzip the files short and not under directories that contain spaces. For example, within Windows unzip to C:\_apex.]

2. Change your working directory to apex.

3. Start SQL*Plus and connect to the Oracle XE database:

  • Linux:
            $ sqlplus /nolog
            SQL> CONNECT SYS as SYSDBA
            Enter Password:	SYS_Password
    
  • Windows:
            {Command prompt} C:\apex> sqlplus /nolog
            SQL> CONNECT SYS as SYSDBA
            Enter Password:	SYS_Password
    

4. Install Application Express:

  • SQL> @apexins SYSAUX SYSAUX TEMP /i/

5. Log back into SQL*Plus (as above) and configure the Embedded PL/SQL Gateway (EPG):

  • SQL> @apex_epg_config.sql APEX_HOME
  • [Note: APEX_HOME is the directory you specified when unzipping the file. For example, with Windows ‘C:\’.]

6. Upgrade Application Express password:

  •         SQL> @apxchpwd
            Enter password for Application Express ADMIN account.
    

7. In a Web browser, navigate to the Oracle Application Express Administration Services application: