20250315 - 글로벌 변수 Global Variables

G_USER Specifies the currently logged in user.

G_FLOW_ID Specifies the ID of the currently running application.

G_FLOW_STEP_ID Specifies the ID of the currently running page.

G_FLOW_OWNER

Defaults to the application's parsing schema. Use #OWNER# to reference this value in SQL queries and PL/SQL.


Note:Changing G_FLOW_OWNER at runtime does not change the parsing schema.

G_REQUEST Specifies the value of the request variable most recently passed to or set within the show or accept modules.

G_BROWSER_LANGUAGE Refers to the web browser's current language preference.

G_DEBUG Refers to whether debugging is switched on or off. Valid values for the DEBUG flag are Yes or No. Enabling debug shows details about application processing.

G_HOME_LINK Refers to the home page of an application. If no page is given and if no alternative page is dictated by the authentication scheme's logic, the Oracle APEX engine redirects to this location.

G_LOGIN_URL Used to display a link to a login page for users that are not currently logged in.

G_IMAGE_PREFIX Refers to the virtual path the web server uses to point to the images directory distributed with APEX.

G_FLOW_SCHEMA_OWNER Refers to the owner of the APEX schema.

G_PRINTER_FRIENDLY Refers to whether the APEX engine is running in print view mode. This setting can be referenced in conditions to eliminate elements not desired in a printed document from a page.

G_PROXY_SERVER Refers to the application attribute Proxy Server.

G_SYSDATE Refers to the current date on the database server. G_SYSDATE uses the DATE datatype.

G_PUBLIC_USER Refers to the Oracle schema used to connect to the database through the database access descriptor (DAD).

G_GLOBAL_NOTIFICATION Specifies the application's global notification attribute.

G_X01, ... G_X10 Specifies the values of the X01, ... X10 variables most recently passed to or set within the show or accept modules. You typically use these variables in On-Demand AJAX processes. 


=====

APEX_CSP_DISPLAY_NONE

APEX_FILES

APEX$ROW_NUM

APEX$ROW_SELECTOR

APEX$ROW_STATUS

APP_ID

APP_ALIAS

APP_AJAX_X01, ... APP_AJAX_X10

APP_BUILDER_SESSION

APP_DATE_TIME_FORMAT

APP_FILES

APP_NLS_DATE_FORMAT

APP_NLS_TIMESTAMP_FORMAT

APP_NLS_TIMESTAMP_TZ_FORMAT

APP_PAGE_ALIAS

APP_PAGE_ID

APP_REGION_ID

APP_REGION_STATIC_ID

APP_REQUEST_DATA_HASH

APP_SESSION

APP_SESSION_VISIBLE

APP_TITLE

APP_UNIQUE_PAGE_ID

APP_USER

APP_VERSION

AUTHENTICATED_URL_PREFIX

BROWSER_LANGUAGE

CURRENT_PARENT_TAB_TEXT

DEBUG

HOME_LINK

JET_BASE_DIRECTORY

JET_CSS_DIRECTORY

JET_JS_DIRECTORY

LOGIN_URL

LOGOUT_URL

APP_TEXT$Message_Name, APP_TEXT$Message_Name$Lang

OWNER

PRINTER_FRIENDLY

PROXY_SERVER

PUBLIC_URL_PREFIX

REQUEST

Using REQUEST

SCHEMA OWNER

SQLERRM

SYSDATE_YYYYMMDD

THEME_DB_FILES

THEME_FILES

WORKSPACE_FILES

WORKSPACE_ID


참고

https://docs.oracle.com/en/database/oracle/apex/23.2/aeapi/APEX_APPLICATION-Global-Variables.html

https://docs.oracle.com/en/database/oracle/apex/24.1/htmdb/using-available-built-in-substitution-strings.html

20250304 - 버튼 액션 및 포커스 제거

JS :

$("#your-button-id").on("click", function(e) {

  e.preventDefault();

  return false;

});


CSS:

.your-button-class {

  pointer-events: none;

}


Button URL:

javascript:void(0);



20250218 - 여러 종류 메세지 보이기

 // 기본 alert 대신:

apex.message.showPageSuccess('저장되었습니다');  // 성공 메시지 (초록색)

apex.message.showPageError('오류가 발생했습니다');    // 에러 메시지 (빨간색)

apex.message.showPageWarning('주의가 필요합니다');    // 경고 메시지 (노란색)

apex.message.showPageInfo('참고해주세요');      // 정보 메시지 (파란색)


// 타이틀과 함께 표시:

apex.message.alert('메시지 내용', '타이틀');  // 확인 버튼이 있는 모달 창


// 콜백 함수 사용:

apex.message.confirm('저장하시겠습니까?', function(okPressed) {

    if (okPressed) {

        // OK 버튼 눌렀을 때 실행할 코드

    }

});


// 자동으로 사라지는 메시지:

apex.message.clearErrors();

apex.message.showPageSuccess('저장되었습니다', function() {

    // 3초 후 자동으로 사라짐

});


//아이콘 포함


('#SID_BTN_RADMIN').on('click', function(e) {
   e.preventDefault();
   apex.message.clearErrors();
   
   apex.message.confirm("진행을 취소하고 관리 메인 페이지로 이동하시겠습니까?", function(okPressed) {
       if (okPressed) {
           const url = `f?p=${$v('pFlowId')}:200:${$v('pInstance')}::NO:::`;
           
           apex.server.process(
               'AJAX-popup',
               {x01: url},
               {
                   success: function(pData) {
                       pData = pData.replace(",this", ",'#SID_BTN_RADMIN'");
                       apex.navigation.redirect(pData);
                   },
                   error: function() {
                       apex.message.alert("페이지 이동 중 오류가 발생했습니다.");
                   },
                   dataType: "text"
               }
           );
       }
   }, {
        title: "확인 요청",
        style: "warning"
   });
});

20250217 - IG 수정 가능항목에 폰트 색상 Class 넣기

SQL :


     , case
         when delivery_req is null or delivery_req = '' then ''
         when regexp_instr(delivery_req, '/[0-9]|[0-9]일|[0-9].[0-9]|평일|주말|요일|[0-9]월') > 0 then 'css-red'
         else ''
       end as delivery_req_style
     , delivery_req


Column Initialization JavaScript Function :


function(options) {
    options.defaultGridColumnOptions = {
        cellCssClassesColumn: "DELIVERY_REQ_STYLE"
    }
    return options;
}






읽기 전용 항목이면, 간단히 HTML Expression으로.

     , decode(regexp_instr(nvl(delivery_req,''), '/[0-9]|[0-9]일|[0-9].[0-9]|평일|주말|요일|[0-9]월'), 0
              , '<span>'||delivery_req||'</span>'
              , '<span class="css-red">'||delivery_req||'</span>') delivery_req_css




참고

https://apexapps.oracle.com/pls/apex/r/apex_pm/ideas/details?idea=FR-2656&cs=1UuSgWyFNcx0mxFPVL9acva6DYDiz8xoQU3igQfQX24AfPiSBv0TbsWdvNk6cKRXRJnAQd-FirfRIh0qh3XMbQA

20250315 - 글로벌 변수 Global Variables

G_USER Specifies the currently logged in user. G_FLOW_ID Specifies the ID of the currently running application. G_FLOW_STEP_ID Specifi...