I have a calendar and when the user click on it, i want to do one of these two actions:
If GROUP_SESSION = 0 and ID > 0 to open a modal page P2003 for editing with the specific record according to ID
elsIF GROUP_SESSION = 1 and ID > 0 to open modal page P2161 for editing with the specific record according to ID
Primary Key Column is ID.
My APPOINTMENTS View code:
CREATE OR REPLACE FORCE EDITIONABLE VIEW "APPOINTMENTS" ("ID", "SESSION_DISPLAY", "SESSION_DATE", "SESSION_END", "GROUP_SESSION", "CSS_CLASS") AS
select s.ID,
p.First_name || ' ' || p.Last_Name || '-> ' || sa.SESSION_AREA || '-> ' || to_char(s.SESSION_DATE, 'DD-MM-YY - HH24:MI') || ' -> '
|| ' -> ' || ss.STATUS_NAME || ' και ' || ps.PAYMENT_DESCRIPTION as Session_Display,
s.SESSION_DATE,
s.SESSION_STOP,
0,
case when ss.ID = 5 and ps.ID = 2 then 'apex-cal-green'
when ss.ID = 5 and ps.ID = 1 then 'apex-cal-red'
when ss.ID = 3 then 'apex-cal-yellow'
when ss.ID = 4 then 'apex-cal-black'
else 'apex-cal-blue'
end as css_class
from SESSION_STATUS ss
inner join SESSIONS s on s.STATUS=ss.ID
inner join PAYMENT_STATUS ps on s.PAYMENT_STATUS=ps.ID
inner join CLIENTS p on s.CLIENTS_ID=p.ID
inner join SESSIONS_AREA sa on sa.ID = s.SESSION_AREA
where s.SESSION_TYPE = 1
UNION ALL
select gs.ID,
' ΟΜΑΔΙΚΗ !! ' || '-> ' || sa.SESSION_AREA || ' -> ' || to_char(gs.SESSION_DATE, 'DD-MM-YYYY - HH24:MI')
|| ' -> ' || gs.SUBJECT ||' -> '|| ss.STATUS_NAME as Session_Display,
gs.SESSION_DATE,
gs.SESSION_STOP,
1,
case when ss.ID = 5 then 'apex-cal-green'
when ss.ID = 3 then 'apex-cal-yellow'
when ss.ID = 4 then 'apex-cal-black'
else 'apex-cal-blue'
end as css_class
from SESSION_STATUS ss
inner join GROUP_SESSIONS gs on ss.ID = gs.SESSION_STATUS
inner join SESSIONS_AREA sa on sa.ID = gs.SESSION_AREA
/