Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

create a navbar using list sql for calendar selection

NO NameMay 13 2024

//This is the navbar query in the screenshot below

SELECT level,
label,
target,
is_current_list_entry,
image,
null image_attribute,
null image_alt_attribute,
null attribute1,
li_class attribute2
FROM (
SELECT 3 node_id,
NULL parent_node_id,
'Kalender' label,
'#' target,
'NO' is_current_list_entry,
'' image,
0 seq,
NULL li_class
FROM dual

UNION ALL

SELECT 1 node_id,
NULL parent_node_id,
'Theme Version' label,
'#' target,
'NO' is_current_list_entry,
'fa-hashtag' image,
1 seq,
NULL li_class
FROM dual

UNION ALL

SELECT NULL node_id,
1 parent_node_id,
REGEXP_SUBSTR(a.version, '\d+\.\d+') || CASE WHEN a.application_id = apex_session_state.get_number('APP_ID') THEN ' (Current)' END label,
COALESCE((SELECT apex_page.get_url(
p_application => ap.application_id,
p_page => ap.page_id)
FROM apex_application_pages ap
WHERE ap.application_id = a.application_id
AND ap.page_id = apex_session_state.get_number('APP_PAGE_ID')),
apex_util.prepare_url(p_url => 'f?p=' || a.application_id)) target,
CASE WHEN a.application_id = apex_session_state.get_number('APP_ID') THEN 'YES' ELSE 'NO' END is_current_list_entry,
NULL image,
ROW_NUMBER() OVER (ORDER BY a.version DESC) seq,
NULL li_class
FROM apex_applications a
WHERE a.application_group = 'Universal Theme'

UNION ALL

   SELECT NULL node\_id,  
      3 parent\_node\_id,  
      TO\_CHAR(EXTRACT(YEAR FROM ADD\_MONTHS(SYSDATE, -36))) label,   
      '#' target,   
      'NO' is\_current\_list\_entry,  
      NULL image,  
      4 seq,  
      NULL li\_class  
 FROM dual

UNION ALL

SELECT NULL node_id,
3 parent_node_id,
TO_CHAR(EXTRACT(YEAR FROM ADD_MONTHS(SYSDATE, -24))) label,
'#' target,
'NO' is_current_list_entry,
NULL image,
5 seq,
NULL li_class
FROM dual

UNION ALL

SELECT NULL node_id,
3 parent_node_id,
TO_CHAR(EXTRACT(YEAR FROM ADD_MONTHS(SYSDATE, -12))) label,
'#' target,
'NO' is_current_list_entry,
NULL image,
6 seq,
NULL li_class
FROM dual

UNION ALL

SELECT NULL node_id,
3 parent_node_id,
TO_CHAR(EXTRACT(YEAR FROM SYSDATE)) label,
'#' target,
'NO' is_current_list_entry,
NULL image,
7 seq,
NULL li_class
FROM dual

UNION ALL

SELECT NULL node_id,
3 parent_node_id,
TO_CHAR(EXTRACT(YEAR FROM ADD_MONTHS(SYSDATE, 12))) label,
'#' target,
'NO' is_current_list_entry,
NULL image,
8 seq,
NULL li_class
FROM dual
)
START WITH parent_node_id IS NULL
CONNECT BY PRIOR node_id = parent_node_id
ORDER SIBLINGS BY seq;

So how do I kalender so that when you click on a number, for example 2024, it is saved in the session, then the calendar is 2024, because I was confused, when I clicked it, it was saved in the session, then later the session will be used to create the interactive report table.

Comments
Post Details