Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Disabling table columns and rows according to a conditional date (APEX 3.2.1)
Disabling table columns and rows according to a conditional date [message #431665] Thu, 19 November 2009 00:33 Go to next message
sohan
Messages: 11
Registered: October 2009
Location: India
Junior Member
Hi All,

Is it possible to disable (grey out and not allow updates) particular table columns and rows depending on a conditional date.I have an interactive report on which the above operation is to be done.

I have an online test application and the idea is to allow a view of all tests that are queued for the user in the future, but the tests those are having the test dates greater than the sysdates should be dispalyed but only in the read only format. They would be enabled only when the exact date and time matches the server date and time.

Can anyone help me to resolve this query..


Regards,
Sohan
Re: Disabling table columns and rows according to a conditional date [message #432152 is a reply to message #431665] Sun, 22 November 2009 03:58 Go to previous messageGo to next message
dbhossain
Messages: 155
Registered: August 2007
Location: Dhaka
Senior Member

Dear sohan,

Try with the following Query in your Interactive report SQL source:
*** just copy the below sql statement and directly paste into your sql source of interactive report and judge the preview to have more idea regarding this.


SELECT 
CASE WHEN (SYSDATE-HIREDATE)>10200 THEN
     APEX_ITEM.TEXT(1,EMPNO,20,20,'style="width:30px;
      font-size:11;text-align:center;color:#F10909;
       font-weight:bold;border:none;background:none;"'
                    ||'readonly="readonly"')
ELSE
     APEX_ITEM.TEXT(1,EMPNO,20,20,'style="width:30px;
                    font-size:10;text-align:center;"')

END
AS EMPNO,

CASE WHEN (SYSDATE-HIREDATE)>10200 THEN
     APEX_ITEM.TEXT(2,ENAME,20,20,'style="width:70px;
      font-size:11;text-align:center;color:#F10909;
       font-weight:bold;border:none;background:none;"'
                    ||'readonly="readonly"')
ELSE
     APEX_ITEM.TEXT(2,ENAME,20,20,'style="width:70px;
                    font-size:10;text-align:center;"')

END
AS ENAME,

CASE WHEN (SYSDATE-HIREDATE)>10200 THEN
     APEX_ITEM.TEXT(3,SAL,20,20,'style="width:50px;
      font-size:11;text-align:center;color:#F10909;
       font-weight:bold;border:none;background:none;"'
                    ||'readonly="readonly"')
ELSE
     APEX_ITEM.TEXT(3,SAL,20,20,'style="width:50px;
                    font-size:10;text-align:center;"')

END
AS SAL,
CASE WHEN (SYSDATE-HIREDATE)>10200 THEN
     APEX_ITEM.TEXT(4,JOB,20,20,'style="width:70px;
      font-size:11;text-align:center;color:#F10909;
       font-weight:bold;border:none;background:none;"'
                    ||'readonly="readonly"')
ELSE
     APEX_ITEM.TEXT(4,JOB,20,20,'style="width:70px;
                    font-size:10;text-align:center;"')

END
AS JOB


FROM EMP


Hope you will get idea


Thanks.

---M. Kamal Hossain

[Updated on: Sun, 22 November 2009 04:08]

Report message to a moderator

Re: Disabling table columns and rows according to a conditional date [message #432156 is a reply to message #432152] Sun, 22 November 2009 04:55 Go to previous message
salwa
Messages: 76
Registered: December 2007
Member
Apex guru
Nice
Previous Topic: how to convert developer 6i to apex
Next Topic: Version control for application
Goto Forum:
  


Current Time: Wed Dec 04 19:55:11 CST 2024