Monday, November 15, 2021

Login User Image Display on Navigation Menu In Oracle Apex


1
.Create application item name > 'IMAGE_ID',> Session State Protection > Unrestricted.

2.Create Application Processes > 'GETIMAGE',> Process Point > Ajax Callback, > PL/SQL Code >

begin for c1 in (select * from employee_information where unique_id = :IMAGE_ID) loop sys.htp.init; sys.owa_util.mime_header( c1.MIME_TYPE, FALSE ); sys.htp.p('Content-length: ' || sys.dbms_lob.getlength( c1.PICTURE)); sys.htp.p('Content-Disposition: attachment; filename="' || c1.FILENAME || '"' ); sys.htp.p('Cache-Control: max-age=3600'); -- tell the browser to cache for one hour, adjust as necessary sys.owa_util.http_header_close; sys.wpg_docload.download_file( c1.PICTURE); apex_application.stop_apex_engine; end loop; end;

3.Create/Select navigation bar where you want to show image > User Defined Attributes 1.

<img style="width:25px;height:25px;border-radius:50%;cornflowerblue" src="f?p=&APP_ID.:0:&APP_SESSION.:APPLICATION_PROCESS=GETIMAGE:::IMAGE_ID:&APP_USER." alt=" ">

Tuesday, November 9, 2021

Oracle Apex 21.2 Installation & ORDS Configuration


 1.@apexins.sql sysaux sysaux temp /i/

2.@apxchpwd.sql

3.@apex_rest_config.sql

4. Unlock All Locked User :      select username,account_status from dba_users  where username like 'APEX%';
select username,account_status from dba_users  where username like  'ORDS%';
or

select username,account_status from dba_users where lock_date is not null and username like 'APEX%'; )

For Oracle Database version 12c or later run the below script:

BEGIN
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => '*',
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => 'APEX_210100',
principal_type => xs_acl.ptype_db));
END;
/ BEGIN
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => 'localhost',
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => 'APEX_210100',
principal_type => xs_acl.ptype_db));
END;
/ EXEC DBMS_XDB.sethttpport(0);


#unzip ords file :

    copy the images folder from the apex directory and paste it to ords folder.

Download Link :
jdk-https://www.oracle.com/java/technologies/javase-downloads.html

Ords-https://www.oracle.com/database/technologies/appdev/rest-data-services-v192-downloads.html

Ords Run Command:

Set path=C:\Program Files\Java\jdk-18.0.2.1\bin
java -jar ords.war serve
java -jar ords.war --config  D:\Oracle\ords\config serve

Internal User Unlock & Password change:

First need to log in Oracle sys user.

SELECT TO_CHAR(user_id),
first_name,USER_NAME,
last_name,
default_schema
FROM wwv_flow_fnd_user
WHERE user_name = 'ADMIN'
ORDER BY last_update_date DESC;

ALTER SESSION SET CURRENT_SCHEMA = APEX_190200;

begin
wwv_flow_security.g_security_group_id := 10;
wwv_flow_fnd_user_api.UNLOCK_ACCOUNT('ADMIN');
commit;
end;

UPDATE wwv_flow_fnd_user
SET web_password = 'Enter your password'
WHERE user_name = 'ADMIN'
AND user_id =1200348866127291;

What's New in Oracle APEX 21.2


 1. Smart Filters : Smart Filters is a new search component that allows users to quickly narrow data down with filters suggestions or search items. In Smart Filters include -Powerful Search Bar, Search Suggestions, Suggestion Chips.

2.Progressive Web Apps : APEX apps can easily be defined as Progressive Web Apps (PWAs) to take advantage of advanced caching and improved performance. These apps can also be installed on  smartphone of choice with device-specific installation instructions. Progressive Web Apps Include-
App Performance, Apex Application Instable, Custom Offline Page.

3. Universal Theme & UI Updates : The updated Reference App now provides live Template Option previews, documented CSS variables, and a new Theme Version menu in the header to quickly jump to Reference Apps for previous versions of the Universal Theme. New updates are- Greater Flexibility in Page Layouts, Model Dialog Drawers, Accessibility Improvements, Faster Page Rendering.

4. New & Updated Components :
    1.Faceted Search Enhancements : Multi-Value Facets, Additional UI Controls, 
        Accessibility Improvements.

    2. Update Alert and Confirm Dialogs : Customizable Dialogs, Support for Template Directives, Button Confirmation.

5.Geocoding and Map Items : Geocoding your addresses has never been easier, and you can even display a map as a page item . The best part is that you don't need an API key.

6.REST Catalogs and Improvements : 
    1. Search Catalogs Across Apps.
    2. Easy Export and Import.
    3.URL-based Updating.
    4. Pagination Support for REST Services.

7. Improved Report Downloads, Subscriptions, and Printing :
    1. Images in Report Downloads.
    2. Download Dialog Improvements.
    3.Interactive Report Subscriptions.

8. Developer Experience :
    1.Improved Editors :Static File Editor, Improved Breadcrumb Editor, Run Larger SQL in SQL Commands (SQL Commands now supports  more than 32k characters).

9. Email and Email Template Enhancements :
    1. Email Support in Automations.
    2.Copy Email Templates.
    3. Inline Email Attachments.

10. Additional Features :
    1.Data Packager.
    2. Popup LOV Set Display Value.
    3. New Date Picker 'Show-On' attribute.
    4. New Modal Dialog Event.
    5.Copyright Banner in App Exports.
    6.New PL/SQL APIs.
    7. New JavaScript APIs.
    8.Build Apex Apps in 21 additional Language.
    9. JavaScript Library Upgrades.


Oracle Apex Uninstall Process


Oracle Apex Uninstall : 

First we need to go to Apex Folder & Connect Database Using SQL Plus Or  CMD.
Then Execute These Command:  @apxremov_con.sql                                                 OR @apxremov.sql


Sunday, September 19, 2021

Parent Page Refresh After Model Page Close

 1. First we need to create Dynamic Action In Parent Page.

            Event : Dialog Close
            Selection Type : Region
            Region : Select Specific Region

Create True Action :
        Action : Close Dialog

Create another True Action :
       Action : Refresh
      Selection Type : Region
     Region : Select Specific Region

2. After That we need to create Process in Model Page .
        Name : PageClose(Give a meaningful Name )
        Type : Close Dialog
    Server Side Condition:
        Type : Request is contained in Value
        Value :Shift_Update(Update Button Name)

Friday, July 30, 2021

Custom Chart & Custom Chart Color In Oracle Apex


 From Chart Attribute In Advance Option

JavaScript Initialization Code Section add Following Code :
========================================

function (options){

  function (options){

    options.dataFilter = function (data){

        data.series[0].color = "green";

        

        data.series[1].color = "red";

        data.series[2].color = "blue";

        data.series[3].color = "Yellow";

        data.series[3].color = "gray";

        return data;

    };

  // Add new 3D effect to existing chart style defaults   

     options.styleDefaults.threeDEffect = "on";

     return options;

    //options.styleDefaults = $.extend( options.styleDefaults, {threeDEffect: "on"});

   // return options;

}


Classic Report Background Color Change (Based On Condition)


 1. Create Dynamic Action 

       => Execute JavaScript Code

Add Following Code in to Execute JavaScript Code Section:
=============================================

$('td[headers="ENTRY_STATUS"]').each(function() {  

  if ( $(this).text() === 'Weekend' ) {

    $(this).closest('tr').find('td').css({"background-color":"rgb(37 90 185 / 68%)"});

      $(this).closest('tr').find('td').css({"color":"black"});

      $(this).closest('tr').find('td').css({"font-weight":"bold"});

      $(this).closest('tr').find('td').css({"border":"1px solid #D6EAF8  !important"});

  }

   if ( $(this).text() === 'Govt. Holiday' ) {

    $(this).closest('tr').find('td').css({"background-color":"#4FA64F "});

      $(this).closest('tr').find('td').css({"color":"black"});

       $(this).closest('tr').find('td').css({"font-weight":"bold"});

      $(this).closest('tr').find('td').css({"border":"1px solid #D6EAF8  !important"});

  }

  if ( $(this).text() === 'Present' ) {

    $(this).closest('tr').find('td').css({"background-color":"ghostwhite"});

    $(this).closest('tr').find('td').css({"font-weight":"bold"});

  }

  if ( $(this).text() === 'Late' ) {

    $(this).closest('tr').find('td').css({"background-color":"#997570"});

      $(this).closest('tr').find('td').css({"color":"white"});

      $(this).closest('tr').find('td').css({"font-weight":"bold"});

  }

    if ( $(this).text() === 'Absent' ) {

    $(this).closest('tr').find('td').css({"background-color":"#E8453A"});

        $(this).closest('tr').find('td').css({"color":"white"});

        $(this).closest('tr').find('td').css({"font-weight":"bold"});

  }

    if ( $(this).text() === 'Leave' ) {

         $(this).closest('tr').find('td').css({"background-color":"yellow"});

         $(this).closest('tr').find('td').css({"color":"black"});

         $(this).closest('tr').find('td').css({"font-weight":"bold"});

  }

    

  if ( $(this).text() === 'Short Leave' ) {

        $(this).closest('tr').find('td').css({"background-color":"cadetblue"});

        $(this).closest('tr').find('td').css({"font-weight":"bold"});

  }

 if ( $(this).text() === 'Tour' ) {

    $(this).closest('tr').find('td').css({"background-color":"#117A65"});

    $(this).closest('tr').find('td').css({"color":"white"});

    $(this).closest('tr').find('td').css({"font-weight":"bold"});

  }

});

Sunday, July 4, 2021

Condition Based LOV(List of Value) In Oracle Apex



 List of Value Type: Pl/SQL Function Body Returning SQL


Declare 

  v_type varchar2(1) := :P45_RETURN_TYPE;

 Begin

  If v_type = 'C' then

    Return 'SELECT CUSTOMER_ID R,CUSTOMER_NAME D,CUSTOMER_NAME,CUSTOMER_PHONE,CUSTOMER_ADDRESS

            FROM CUSTOMER_INFORMATION WHERE CUSTOMER_ID IN(SELECT CUSTOMER_ID FROM INVOICE_MASTER)'

                 -- where some_column = ''CONDITION 1''

                  ;

  Else

     Return 'SELECT SUPPLIER_ID R,SUPPLIER_NAME D,SUPPLIER_NAME,SUPPLIER_PHONE,SUPPLIER_ADD

             FROM SUPPLIER_INFORMATION WHERE SUPPLIER_ID IN(SELECT SUPPLIER_ID FROM PRODUCT_RECEIVE_MASTER)'

                  --where some_column = ''CONDITION 2''

                  ;

  End if;

End;

Image File store outside of Oracle Database and show image into Apex Application

Directory Create : grant execute on utl_file to HRMS; CREATE OR REPLACE DIRECTORY STOCK_DIRECTORY AS 'C:\Program Files (x86)\Apache Sof...