This discussion is archived
3 Replies Latest reply: Feb 5, 2013 1:05 AM by Gus C RSS

APEX_ITEM.DATE_POPUP2 and Nulls

Gus C Journeyer
Currently Being Moderated
In my updateable report I have a column, which is a date.
APEX_ITEM.DATE_POPUP2(6,p.value_date,'DD.MM.YYYY','15','10','style=""',null,null,null,null,null,'both',null,'MONTH_AND_YEAR')  value_date_new
I need to change this field to null and disable if a certain condition is met.
case when p.parameter = 'TRANSFERDAY' then null
            else
APEX_ITEM.DATE_POPUP2(6,p.value_date,'DD.MM.YYYY','15','10','style=""',null,null,null,null,null,'both',null,'MONTH_AND_YEAR')  end value_date_new
I have searched for APEX_ITEM.DATE_POPUP2 but cannot find an answer to my problem

Cheers

Gus
  • 1. Re: APEX_ITEM.DATE_POPUP2 and Nulls
    Joni Vandenberghe Pro
    Currently Being Moderated
    You already answered alot of your own question I think
    case when p.parameter = 'TRANSFERDAY' then 
    APEX_ITEM.DATE_POPUP2(6,NULL,'DD.MM.YYYY','15','10','style="" disabled="disabled"',null,null,null,null,null,'both',null,'MONTH_AND_YEAR')
                else
    APEX_ITEM.DATE_POPUP2(6,p.value_date,'DD.MM.YYYY','15','10','style=""',null,null,null,null,null,'both',null,'MONTH_AND_YEAR')  end value_date_new
    I added null and disabled.

    Btw it helps alot for readability if you use named parameters
  • 2. Re: APEX_ITEM.DATE_POPUP2 and Nulls
    Joni Vandenberghe Pro
    Currently Being Moderated
    You already answered alot of your own question I think
    case when p.parameter = 'TRANSFERDAY' then 
    APEX_ITEM.DATE_POPUP2(6,NULL,'DD.MM.YYYY','15','10','style="" disabled="disabled"',null,null,null,null,null,'both',null,'MONTH_AND_YEAR')
                else
    APEX_ITEM.DATE_POPUP2(6,p.value_date,'DD.MM.YYYY','15','10','style=""',null,null,null,null,null,'both',null,'MONTH_AND_YEAR')  end value_date_new
    I added null and disabled.

    Btw it helps alot for readability if you use named parameters
  • 3. Re: APEX_ITEM.DATE_POPUP2 and Nulls
    Gus C Journeyer
    Currently Being Moderated
    Have changed my code to
    ,case when parameter = 'TRANSFERDAY' then 
    APEX_ITEM.DATE_POPUP2(6,NULL,'DD.MM.YYYY','15','10','style="" disabled="disabled"',null,null,null,null,null,'both',null,'MONTH_AND_YEAR')
    else
    APEX_ITEM.DATE_POPUP2(6,value_date,'DD.MM.YYYY','15','10','style=""',null,null,null,null,null,'both',null,'MONTH_AND_YEAR')  end value_date_new
    On the report the field is greyed out and no data is displayed, which is correct.
    Now when I save the data, it is using the value of value_data from the next row

    Gus

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points