DATE_POPUP

When I use htmldb_item.date_popup in SQL report with an order by clause,
the data that I select to replace the current row goes to another row instead.
This does not happen if I remove the order by clause.
Has anyone encountered this ? How to work around it ?

I had the same problem, and used this workaround:
Put the original query in a subquery where you do the order by and then build the date popup on the result set.
For example, if your original query is
SELECT field1,
              field2,
              apex_item.date_popup(1,date_field) "My Date"
FROM someTabel Order by field 1then try
SELECT /*+NO_MERGE(sub)*/
             subfield1,
              subfield2,
              apex_item.date_popup(1,subdate_field) "My Date"
FROM  (
       SELECT
           field1 subfield1,
           field2 subfield2,
           date_field subdate_field
        FROM someTabel Order by field1
          ) subThe NO_MERGE hint is needed to prevent the optimizer from merging your query and the subquery back into one query.
Regards
Stephan

Similar Messages

  • Problem with Date Picker and wwv_flow_item.date_popup()

    I have a Report based on the HTMLDB How-To “Build Tabular Forms for Multi-Row Operations”
    This is my code:
    select
    X.RRIT_UID,
    X.DOS,
    X.CPT_CODE,
    X.MOD,
    X.DX_CODE,
    X.CHARGES,
    X.UNITS
    from
    (select
    htmldb_item.text(1,RRIT_UID) RRIT_UID,
    wwv_flow_item.date_popup(2,null,RRIT_DATE_OF_SERVICE) DOS,
    htmldb_item.text(4,RRIT_SUBMIT_SERVICE_CODE,6) CPT_CODE,
    htmldb_item.text(5,RRIT_SUBMIT_MODIFIER,3) MOD,
    htmldb_item.text(6,RRIT_ATT_DIAG_CODE,6) DX_CODE,
    htmldb_item.text(7,RRIT_BILLED_CHARGES,9) CHARGES,
    htmldb_item.text(8,RRIT_UNITS,3) UNITS
    from
    RRIT_REPRICE_ITEM
    where
    RRRR_UID = :P5_RRRR_UID
    union all
    select
    htmldb_item.text(1,null) RRIT_UID,
    wwv_flow_item.date_popup(2,null,null) DOS,
    htmldb_item.text(4,null,6) CPT_CODE,
    htmldb_item.text(5,null,3) MOD,
    htmldb_item.text(6,null,6) DX_CODE,
    htmldb_item.text(7,null,9) CHARGES,
    htmldb_item.text(8,null,3) UNITS
    from
    dual)
    X
    My problem is when I run the page and select a date from the Pop-Up calendar I get this error:
    Line 10
    Error: ‘opener.document.forms.0.f02.0’ is null or not an object
    I know it is something to do with data formats and the fact that I do not fully understand the use of wwv_flow_item.date_popup().

    Hi DK,
    It is a WD Java application, Backend is ABAP (MM module).
    The UI is input field, where the context attribute type is Date, So its been changed to Date Picker.
    The problem is when the user runs the WD application in Portal, The calendar format is being changed for some users. That is for few users the Week starts with Monday and for few users the week starts with Sunday.
    I need all the users to have Monday as the First day of the week.
    Please let me know, what will be solution for this.
    Since I haven't done anything in regard to date, it is a simple Date format.
    Thanks & Regards,
    Palani

  • Problem with apex_item.date_popup in APEX 3.1

    Hi,
    I encountered a problem with the date_popup item after installing APEX3.1, probably someone can tell me if I am doing something wrong or if it is a sequel bug of 3.0.
    I have a form with a manually generated region displaying a row with different kinds of input fields for every entry in a look up table. So there may be 5 rows to enter values or 30.
    There are two date_popup fields in each row (id x and y), therefore it is not possible to give each of these popup-fields a unique id as it would exceed the limit of 50.
    The problem is the same as in version 3.0 and before: when I select a date, let's say in the popup with id x row 6, it will allways show up in the first date_popup-field with id ix. The same for the fields with id y.
    I solved the problem in 3.0 by adding an id-attribute with a unique name in html and replacing some values in the html-output. This helped distinguishing the different fields.
    But with 3.1 there ist already an id-attribute (apex_date_11, 11 representing the column)
    <input type="text" name="f11" size="15" maxlength="10" value="" id="P4_foo_2" style="margin-right:5px;" id="apex_date_11" />
    which is referenced by the javascript-function of the popup.
    Every popup either has the value apex_date_11 or apex_date_12.
    This disrupts my work around from version 3.0.
    The only solution that I see to get it working again is to replace or add a unique identifier to the input-id as well as to the function call, like apex_date_11_i.
    Maybe there is another solution to distinguish the different date-fields, like setting the row attribute, which does not work.
    Thanks in advance,
    Alex

    Hello,
    Can you put an example on apex.oracle.com , see if we can help you out.
    What has happened is we have tried to make items and their outputs more consistent across the product. This includes things like auto generation of ID's based on item names, fieldset's around compound items etc, looks like the auto generation of ID's is getting you here.
    Sorry for the trouble.
    Regards,
    Carl
    blog : http://carlback.blogspot.com//
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Htmldb_item.date_popup and sort options in reports

    I use the htmldb_item.date_popup in a report (PLSQL returning SQL). Everything works fine unless I provide the option to sort columns. If I allow a column to be sorted, the date_popup does not return the date to the corresponding field but to another field of the same column. However, the users want to be able to sort the report due to several columns. Can anyone provide a work-around?
    The query is as follows:
    DECLARE
    statement VARCHAR2(32767);
    BEGIN
    statement := '
    select
    htmldb_item.checkbox(47, ID, ''onClick="javascript:doSubmit()"'', :P3_FREISTELLUNG_SELECTED, '':'') as CHECKBOX,
    htmldb_item.hidden(11,ID)||
    htmldb_item.hidden(12,ID_VERTRAG)||
    htmldb_item.date_popup(13,null,VON,''DD.MM.YYYY'',13,10) as BEGINN,
    htmldb_item.date_popup(14,null,BIS,''DD.MM.YYYY'',13,10) as ENDE,
    htmldb_item.date_popup(15,null,ERTEILT,''DD.MM.YYYY'',13,10) as ERTEILT,
    htmldb_item.select_list_from_lov(16,decode(FLAG_CANCELED,null,0,FLAG_CANCELED),''LOV_FREISTELLUNG_NULL'',null,''NO'') as FLAG_CANCELED,
    decode(FLAG_DELETED,1,''direkt gelöscht'',2,''indirekt gelöscht'',''aktiv'') as WERT_DELETED,
    htmldb_item.text(17,BEMERKUNG,20,4000) as BEMERKUNG
    from VERTRAG_FREISTELLUNG where ID_VERTRAG = :P3_KOPF_ID';
    if :P3_FREISTELLUNG_NEU = 2 then
    statement := statement||'
    union all
    select
    null as CHECKBOX,
    htmldb_item.hidden(11,null)||
    htmldb_item.hidden(12,null)||
    htmldb_item.date_popup(13,null,null,''DD.MM.YYYY'',13,10) as BEGINN,
    htmldb_item.date_popup(14,null,null,''DD.MM.YYYY'',13,10) as ENDE,
    htmldb_item.date_popup(15,null,null,''DD.MM.YYYY'',13,10) as ERTEILT,
    null as FLAG_CANCELED,
    null as WERT_DELETED,
    htmldb_item.text(17,null,20,4000) as BEMERKUNG
    from dual';
    end if;
    RETURN statement;
    END;
    PS: I know that the problem already has been discussed in the forum, but I did not find a solution for the problem.

    I have this issue as well with popup_from_query compunded with sorting.
    Wondering if there is any workaround from anyone ?

  • APEX_ITEM.DATE_POPUP problems in 3.1 (already visible in 3.0)

    Hello Everybody,
    I'm completely new to the forum and not sure if you discussed that before... Sorry and please ignore my message if that is the case.
    My development using SQL reports based on collections is blocked because of problems with a date picker generated by apex_item.date_popup call.
    I created a small application illustrating the problem:
    http://apex.oracle.com/pls/otn/f?p=21782:1
    The first two reports presented there are based on sql based on the collection:
    select apex_item.display_and_save(1,c001) name
    ,apex_item.date_popup(2,rownum,to_date(c002,'DD-MM-YYYY HH24:MI:SS'),'DD-MM-YYYY HH24:MI:SS',20,19) hiredate
    from apex_collections
    where collection_name = 'TESTCOL'
    In the first case date popup allows to open a new window but you cannot return value to the field.
    I discovered (second case) that when you change format to 'DD-MM-YYYY' and call API like follows : apex_item.date_popup(2,rownum,to_date(c002,'DD-MM-YYYY HH24:MI:SS'),'DD-MM-YYYY',20,19)
    then the value is returned to the field. However in this case it is returned to the wrong row !!!!!! It looks like it is confused by sorting.
    I explained the steps in the application itself to illustrate it.
    Can anybody help ?
    Piotr

    Scott, Thanks for you kind answer. I had a look at the application that you indicated: 19508.
    Unfortunately I cannot use the solution.
    You propose to define a date picker at the report level. Of course it works in this simple
    application, however my real application generates (depending on data) different item types
    for the same column. For example one row of that column can have apex_item.date_popup and
    the other has apex_item.display_and_save.
    Performing sorting during "create_collection_from_query_b" is not good for me neither (in my
    application I have possibility of adding rows which I commit afterwards). In that case I tried to sort the collection using APEX_COLLECTION.SORT_MEMBERS but then .... I could
    sort only on one column and I need of course more than one ...
    For a moment a can see only one solution: to write my own calendar (and other POPUP functions) returning value to the APEX_ITEM.TEXT. Of course it's a lot of work .... for a workaround.
    Are there any plans at Oracle to fix that "long-standing" issue ?

  • Date_popup returns date to wrong colum...

    Hi,
    I am using wwv_flow_item.date_popup in a select statement, but the problem is it is always returning the value selected to the wrong row.
    I tried many things like putting an order by clause etc, but the same problem.
    I have a query as follows:
    select list..
    from table
    union
    select list
    from dual
    order by x;
    I also tried without the union, but still the same problem. I upgraded my htmldb version from 1.3.6. to 1.5.0.0, but still the same problem.
    Any help is appreciated. If this is a know bug, I shall write my own JS for date popups.
    thanks,
    ashok manthina.

    Hi Sergio,
    Thanks for the update. Here is the complete query...
    select wwv_flow_item.text(1,exam_short_name,10) ExamCode
    ,wwv_flow_item.text(2,description,50) ExamDescr
    ,wwv_flow_item.date_popup(4,rownum,exam_date,'DD-MON-YYYY',15) ExamDate
    ,htf.anchor( 'f?p=101:54:'||:flow_session||'::NO::P54_COURSE_CODE,P54_COURSE_INSTANCE_ID,P54_EXAM_ID:'||:P52_COURSE_CODE||','||:P52_COURSE_INSTANCE_ID||','||exam_id,'<img src="/i/edit_big.gif" border="0">') e
    ,wwv_flow_item.hidden(6,exam_id) ExamId
    ,wwv_flow_item.checkbox(7,exam_id) Del
    from course_exam
    where course_instance_id = :P52_COURSE_INSTANCE_ID
    union
    select wwv_flow_item.text(1,null,10) ExamCode
    ,wwv_flow_item.text(2,null,50) ExamDescr
    ,wwv_flow_item.date_popup(4,rownum,null,'DD-MON-YYYY',15) ExamDate
    ,null
    ,wwv_flow_item.hidden(6,null) ExamId
    ,wwv_flow_item.hidden(7,null) ExamId
    from dual
    Now when I click on the date popup, and select a value it returns to either a row above or below. I could see the problem with the button that is getting generated. The JS associated with the button does not have the correct row number associated.
    For e.g. the date popup button on row 3 has a call to javascript:genCalf04_0(), which obviously is wrong, it should instead be javascript:genCalf04_2()..
    Thanks,
    Ashok Manthina.

  • Date_popup returning value to wrong row

    I have looked at the thread below and still cannot get my code to work
    Re: prevent certain rows in updateable report from being updated??
    I have a tabular form that is used for a mass approval system for managers. In this tabular form the managers are allowed to change 2 fields...that status field which is a static lov and the approval date field. The approval date field will always be null when the user comes into the form so we have this field set automatically to the sysdate. The problem we are encountering is that when we change the date field to something other than sysdate the system will send the new date from the date picker to a different row. I found the thread above and tried to implement it in my code but it is still returning the data to the wrong row. I was trying to decipher the code and wasn't really sure about it so I thought I would put my code here in hopes that someone could help me. (NOTE - I don't really need the decode statement for the date_popup but if I didn't have it I would get an error so the first part of my decode statement shouldn't ever be hit cause we don't have an approval status of P.
    Query Code
    select
    HTMLDB_ITEM.HIDDEN(1,EVAL."EVAL_ID") EVAL,
    EVAL."EVAL_ID" EVAL_ID_DISPLAY,
    HTMLDB_ITEM.SELECT_LIST(2,nvl(EVAL.APPROVE_MID,'Y'),'Approve;Y,Deny;N') MID_STATUS,
    EVAL."EMP_ID",
    EVAL."MID_BEHAVIOR_TOT_AVG",
    EVAL."MID_PERF_TOT_AVG",
    EVAL."FNAME" || ' ' || EVAL."LNAME" NAME,
    EVAL."LOCK_FLAG_MID",
    NVL(EVAL."SUPERVISOR_NAME", ' ') SUPERVISOR,
    decode(EVAL.APPROVE_MID,'p',htmldb_item.text(3,to_char(eval.approve_mid_date,'dd-mon-yyyy'),null,null,'onfocus=this.blur()')||substr(htmldb_item.date_popup(3),1,0),htmldb_item.date_popup(3,NULL,NVL(eval.approve_mid_date,SYSDATE),'dd-mon-yyyy')) mid_date
    from "#OWNER#"."EVAL", "#OWNER#"."EMPLOYEE", "#OWNER#"."TEMP_EMP"
    WHERE EMPLOYEE."SUPERVISOR" = (SELECT POS_NUM FROM EMPLOYEE WHERE TEMP_EMP.CENUM = :APP_USER AND EMP_ID = TEMP_EMP.EMP_ID) AND EMPLOYEE.EMP_ID = EVAL.EMP_ID
    Custom Submit Code
    for i in 1..htmldb_application.g_f01.count
    loop
    update eval
    set approve_mid = htmldb_application.g_f02(i)
    where eval.eval_id = htmldb_application.g_f01(i);
    commit;
    IF :P72_DATE_OVERRIDE IS NULL THEN
    update eval
    set approve_mid_dATE = htmldb_application.g_f03(i)
    where eval.eval_id = htmldb_application.g_f01(i);
    commit;
    ELSE
    update eval
    set approve_mid_date = :P72_DATE_OVERRIDE
    where eval.eval_id = htmldb_application.g_f01(i);
    end if;
    commit;
    end loop;
    HELP PLEASE!!!!!
    Thanks,
    Amber

    mtuser,
    you have to be a little bit more patient, your initial postings was just a few hours ago.
    About your problem, have a look at Re: prevent certain rows in updateable report from being updated??
    I think it explains your problem and offers a solution for it.
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • DATE_POPUP BUG

    DATE_POPUP works perfectly fine if you just have one date that you want to use it for, but it generates the code incorrectly for more than one.
    For example, I have PL/SQL generating text fields and if the value of the text field is in DATE format, it will insert this line:
    HTMLDB_ITEM.DATE_POPUP( 2, NULL, l_columnValue, 'DD-MON-YY' )
    If there is only one DATE_POPUP, the source generated is correct:
    opener.document.forms[0].f02.value = x;
    But if there are two, HTMLDB generates incorrect source for each popup:
    opener.document.forms[0].f02[].value = x;
    Because it never specifies an index, clicking a date will not set the field to the proper date, nor will it closed. Let me know if anyone has a solution for this problem or if there will be a bug fix some time in the near future. Thanks.

    I have an external package that gets called with certain parameters. This is the relevant code:
    FOR lbl IN lbl_cursor( pFN_ID )
    LOOP
    IF (lbl_cursor%rowcount = 1) AND pUPDATE = false THEN
    htp.p( l_columnValue );
    htp.p( HTMLDB_ITEM.HIDDEN( 1, l_columnValue ) );
    ELSIF pUPDATE = false THEN
    IF lbl.FNP_DB_TYPE = 'DATE' THEN
    htp.p( HTMLDB_ITEM.DATE_POPUP( 2, NULL, l_columnValue, 'DD-MON-YY' ) );
    ELSE
    htp.p( HTMLDB_ITEM.TEXT( 1, l_columnValue ) );
    END IF;
    END IF;
    END LOOP;
    Everything is being generated correctly visually and it works perfectly fine when there is only one DATE_POPUP. The problem only occurs when there are two or more DATE_POPUPs.

  • Ajax Report Pull APEX_ITEM.DATE_POPUP  issue

    Hi all,
    I am trying to use something similar to Carl's Ajax Region Pull
    http://htmldb.oracle.com/pls/otn/f?p=11933:48:1222899842354681::NO:::
    So I have 2 pages. My LOV on Page 4 has an onchange event to trigger an Ajax call to page 5 which then displays the results in a region on Page 4.
    Now I am using apex_item calls to allow entry into the report on page 5. Problem is, when I have a date entry item where I have to use apex_item.date_popup then I get a javascript error similar to "genCalf01_0 is not defined" when I click on the date icon to popup the calendar.
    On my instance at work this error is only with the second date field but the first is fine. However on apex.oracle.com, both date icons trigger the problem.
    Any ideas? I have put a sample on http://apex.oracle.com/pls/otn/f?p=38748:4:2006073124664781:::::
    workspace: abots
    username: test
    password: apex_test.
    Cheers
    Kofi

    Hello,
    Using the built in form items pulled from ajax can cause alot of problems and is discouraged. In most cases when you pull a form item from one page into another page it will break your page when you try and submit it.
    Now with the date pickers there is an even bigger issue because there is also embedded individual javascript's associated with each datepicker and when you pull them into the page the page DOM will not pick them up.
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Possible bug with APEX_ITEM.DATE_POPUP

    Hello,
    APEX 3.1 (and maybe even some previous versions).
    It seems like APEX_ITEM.DATE_POPUP creates all the cells in the corresponding column with the same ID. The result is that the dates returned by every date picker, in all the rows of the column, are being placed only in the first row cell.
    I searched the forum, and found couple threads describing the problem, but nothing from the APEX team acknowledging a bug. Is it a bug? If so, and if it’s not already logged, can someone from the APEX team log it as one?
    Thanks,
    Arie.

    Hi Arie,
    Thanks for you reply i dont get any error msg here in date picker the only problem wht i am facing here is when i deploy the java script date picker is not working
    Please suggest me how to modify the existing code
    this is function wht i am calling in the date picker
    <script type="text/javascript">
    function checkdates_baseline(pStartDateItem,pEndDateItem)
    var sdate = document.getElementById(pStartDateItem).value;
    var edate = document.getElementById(pEndDateItem).value;
    if(sdate != "" & edate != "")
    var m2int = {
    Jan: 0,
    Feb: 1,
    Mar: 2,
    Apr: 3,
    May: 4,
    Jun: 5,
    Jul: 6,
    Aug: 7,
    Sep: 8,
    Oct: 9,
    Nov: 10,
    Dec: 11 };
    var start_year = sdate.substring(7,11);
    var start_month = sdate.substring(3,6);
    var start_day = sdate.substring(0,2);
    var start_date = new Date(start_year, m2int[start_month], start_day);
    var end_year = edate.substring(7,11);
    var end_month = edate.substring(3,6);
    var end_day = edate.substring(0,2);
    var end_date = new Date(end_year, m2int[end_month], end_day);
    if( end_date <= start_date )
    alert('The End date must be after the Start Date Baseline');
    document.getElementById(pEndDateItem).value = "";
    </script>
    and this is the SQL query where i am using and deployed the java script
    SELECT
    HTMLDB_ITEM.DATE_POPUP(3,1,null,''DD-Mon-YYYY'',10,8,
    '' id="sdate''||rownum||''" readonly="yes"
    onchange="checkdates_baseline(''''sdate''||rownum||'''''',''''edate''||rownum||'''''');"'')
    "Baseline Start",
    HTMLDB_ITEM.DATE_POPUP(4,2,null,''DD-Mon-YYYY'',10,15,
    '' id="edate''||rownum||''" readonly="yes" onchange="checkdates_baseline(''''sdate''||rownum||'''''',''''edate''||rownum||'''''');"'') "Baseline End"
    FROM
    DUAL
    please suggest with a code or a example how to change this, in apex 3.1
    thanks
    Sudhir

  • Problem with APEX_ITEM.DATE_POPUP

    Hi All,
    I have a date column in IR,
    APEX_ITEM.DATE_POPUP (12,1,null,'DD-Mon-YYYY','','','id="sdate'||rownum||'"') "ISSUE_DATE",
    When I use this syntax the date which I already has is not displaying in the date field, and when I trying to click the icon the date is not get selected
    Anybody is having any idea?
    Thanks,
    Suma.

    Hello,
    Check this for usage of the function :- http://www.utoug.org/i/doc/api085.htm#CHDFDDEI
    This is an example of the usage.
    SELECT
      empno,
      APEX_ITEM.HIDDEN(1,empno)||
      APEX_ITEM.TEXT(2,ename) ename,
      APEX_ITEM.TEXT(3,job) job,
      mgr,
      APEX_ITEM.DATE_POPUP(4,rownum,hiredate,'dd-mon-yyyy') hd,
      APEX_ITEM.TEXT(5,sal) sal,
      APEX_ITEM.TEXT(6,comm) comm,
      deptno
    FROM emp
    ORDER BY 1As you can see <b>HIREDATE</b> is a column of the table <b>EMP</b> Also, please note Usage of <i>rownum</i> has no purpose, as the argument is deprecated.
    Don't think you are calling the function properly. you can try the function call intially from SQL Developer /SQL Plus and see if it generates the correct HTML Code.
    If you still have problems, try updating your thread with more Information like TABLE structure and the complete query you have put in the report,some one can help.
    Hope this helps.
    Thanks,
    Chaitu.

  • APEX_ITEM.DATE_POPUP javascript error

    Hi there
    I have a dynamic report I have built where the date popup has stopped working.
    The date popup works fine for other form fields in other regions on the page but within my dynamic sql report region the javascript is erroring when clicing on the calendar image.
    The Apex version is 2.2.
    The code in the dynamic report is: APEX_ITEM.DATE_POPUP(5,rownum,action_date_time,'dd-MON-RR',9) action_date_time
    The Jscript error is basically: document.forms.0.f05.length is null or not an object.
    The input object in the HTML source is: <input type="text" name="f05" size="9" maxlength="2000" value="03-OCT-06" style="padding-right:5px;" />
    And the Jscript which refers to it is immediately after:
    function genCalf05_0()
    elemArrLen = 0;
    if (document.forms[0].f05.length) {
    elemArrLen = document.forms[0].f05.length;
    ... etc...

    I have discovered why the calendar control is not working -
    As a customisation I included another <form> tag in the menu which is interfering with the popup (forms[0]).
    I may need to look into either doing my customisation a different way (it is above the standard form tag in the menu) or see if I can write some type of custom calendar popup.
    When the calendar control in the actions region is built - some javascript is written by APEX which I have no control over - it looks like
    " if (document.forms[0].f05.length) {
    elemArrLen = document.forms[0].f05.length;
    }"

  • APEX_ITEM.date_popup does not update proper row with column sorting on

    I have the following example sql report query on a page:
    select rownum rowno, object_name
    , object_type
    ,APEX_ITEM.date_popup(43, null, created, 'DD-MON-RR',9) date_created
    from user_objects
    This works fine when I tried to update the date if no sorting is involved. If I allow sorting in APEX by clicking the column headings, the row numbers no longer match up with the the displayed rows. So in order words, if I had the following
    Row MyCol Date
    1 Z
    2 B
    3 K
    If I enabled sorting and click the MyCol column heading, then the following would result:
    Row MyCol Date
    2 B
    3 K
    1 Z
    If I then enter a date for the first displayed row, MyCol=B, then it will update the MyCol=K row because it goes by rownum and it thnks it is rownum=2 where MyCol=B.
    This use to work by putting in a unique id column instead of null for the 2nd parameter to the API. The latest doc says that parameter is depracated and this no longer works. It seems to always go by rownum, and therefore won't work with sorting.
    Any workaround or suggestions?
    We need to have a query similar to above, with sorting enabled on a number of columns and then have a custom PL/SQL process called when the submit button is pressed. It would reference the date column as APEX_APPLICATION.G_F43(I) in this example.
    It used to work. Has this functionality been removed?

    rwessa,
    Right now, there is no reasonable workaround for this immediate issue of using APEX_ITEM.DATE_POPUP in your query and sorting via PPR. The problem is that the generated JavaScript as part of APEX_ITEM.DATE_POPUP is generated at query execution time and then sorted by the reporting engine afterwards (via AJAX/Partial Page Refresh).
    About the only workarounds I can suggest are to disable column-heading sorting for the SQL-based report. If you want sorting, implement sorting via a select list and then use a region type of PL/SQL function returning query, where you append the ORDER BY clause to the SELECT statement. You may also wish to investigate using regular reports (and changing the Display As of the column) or using tabular forms, which would not exhibit this behavior.
    I hope this helps.
    Joel

  • Apex_item.date_popup giving ORA-01403: no data found

    Hi,
    I'm having a problem with apex_item.date_popup(). We're using apex 4.0.2.
    The apex_item.text and apex_item.select_list_from_query are working fine.
    I have a table "dba_comp_veld". Querying this table it gives:
    select COMP_VELD_ID, COMP_VELD_NAAM, COMP_VELD_TYPE, COMP_VELD_TYPE_POPUP, COMP_VELD_TYPE_DATE from dba_comp_veld where comp_id = 81;
    COMP_VELD_ID COMP_VELD_NAAM COMP_VELD_TYPE COMP_VELD_TYPE_DATE
    81 SID T
    82 Poort T
    85 Owner T
    83 Server P
    84 Alias T
    86 Rdbms T
    101 Datum D 20-APR-11
    So, when the COMP_VELD_TYPE = D then I want to user apex_item.date_popup.
    In the page-region (PL/SQL) the source is:
    declare
    nServer number;
    BEGIN
    select min(server_nummer) into nServer from dba_servers;
    for rec in (select COMP_VELD_ID, COMP_VELD_NAAM, COMP_VELD_TYPE, COMP_VELD_TYPE_POPUP, COMP_VELD_TYPE_DATE from dba_comp_veld where comp_id = 81)
    LOOP
    htp.prn(rec.comp_veld_naam||' :');
    case rec.comp_veld_type
    when 'T' then
    htp.prn(APEX_ITEM.TEXT(rec.comp_veld_id, ' ') );
    when 'D' then
    htp.prn(APEX_ITEM.DATE_POPUP(rec.comp_veld_id,'',rec.COMP_VELD_TYPE_DATE,'DD-MON-YY') );
    when 'P' then
    case rec.COMP_VELD_TYPE_POPUP
    when 'DBA_SERVERS' then
    htp.prn(APEX_ITEM.SELECT_LIST_FROM_QUERY(rec.comp_veld_id,nServer,'SELECT NAAM d, server_nummer r FROM dba_servers order by 1',null,'NO'));
    else null;
    end case;
    else null;
    end case;
    htp.prn('
    END LOOP;
    END;
    All the items are displayed ok, except the DATE_POPUP(). I'm getting a ORA-01403: no data found.
    Why? the field rec.COMP_VELD_TYPE_DATE is having a date-value.
    reg.
    Chris
    Edited by: J3v16 on 20-apr-2011 23:43

    Hi Hari,
    I'm just checking my Ayuthentication Scheme (instead of my Authorization scheme) and it seems to be the origin of the "no_data_found" message.
    The thing is that we make a Validation against one internal user table wich defines the office where the user work. That table had the username in lowercases and even the user wrote its username in the login page, using lowercases, the SELECT returned an "no_data_found".
    If the username field in our table is un UPPERCASE, the same function, typing the username in lowercase, returns OK.
    Thanks a lot for your interest
    Agustin

  • Apex_item.date_popup 3.1 bug?

    In an updateable report region, I have a date picker item. However, on my app, when I pick the date, it always populates the first row.
    This does not work:
    select gl_rpt_item_id, description, act_flag, apex_item.hidden(1, gl_rpt_item_id) as item_id,
    apex_item.date_popup(6,rownum, decode(client.get_gl_date(:f102_client_centric_id, gl_rpt_item_id),'NULL','',to_char(client.get_gl_date(:f102_client_centric_id, gl_rpt_item_id))),'DD-MON-YYYY',11,11,decode(act_flag,'I','"DISABLED"'))
    new_gl_dt
    from gl_rpt_item where is_clinical = 'Y' and act_flag <> 'I'
    However, this does populate the right item, I'm just not sure how to handle the save.
    select gl_rpt_item_id, description, act_flag, apex_item.hidden(1, gl_rpt_item_id) as item_id,
    apex_item.date_popup(rownum,rownum, decode(client.get_gl_date(:f102_client_centric_id, gl_rpt_item_id),'NULL','',to_char(client.get_gl_date(:f102_client_centric_id, gl_rpt_item_id))),'DD-MON-YYYY',11,11,decode(act_flag,'I','"DISABLED"'))
    new_gl_dt
    from gl_rpt_item where is_clinical = 'Y' and act_flag <> 'I'

    Scott,
    even the java script wht i use to call in date picker in old version that is not working here in new version
    example :
    select
    HTMLDB_ITEM.DATE_POPUP(3,1,null,'DD-Mon-YYYY',10,15,
    ' id="sdate'||rownum||'" readonly="yes"
    onchange="checkdates_baseline(''sdate'||rownum||''',''edate'||rownum||''');"' ) "Baseline Start",
    HTMLDB_ITEM.DATE_POPUP(4,2,null,'DD-Mon-YYYY',10,15,
    ' id="edate'||rownum||'" readonly="yes" onchange="checkdates_baseline(''sdate'||rownum||''',''edate'||rownum||''');"') "Baseline End"
    from
    dual
    thanks
    Sudhir

Maybe you are looking for

  • HP Photosmart 5520. Can't scan to my computer

    HP Photosmart 5520. I can print FROM my computer just fine, but can't scan from the printer TO my computer. Message is "Connection Error." This happens sometimes, but usually I can fix by turning everything off, disconnecting, and starting over. Toda

  • Time Machine Backup Not Working - Please Help!

    Hey everyone - first post here, please help!  I'm having trouble with TM.  Here are the messages from Time Machine Buddy: Starting automatic backup Backing up to: /Volumes/Time Machine Backups/Backups.backupdb Forcing deep traversal on source: "Macin

  • Why does a .mov slideshow look much darker when played with idvd

    I have created a .mov slideshow from iphoto. I now want to write it to a dvd using iDVD. When setting up the various dropzones the images look great. When I play the .mov in Quicktime, the images look great. When I preview the proposed DVD, all of th

  • Firefox 9.0 keeps on asking to install

    I'm currently running Firefox 9.0. However it keeps on asking me to install Firefox 9.0. Why is that ? I am on the beta update channel.

  • Iweb, rapidweaver, freeway....

    I've been using iWeb but Apple isn't really "supporting" it any more, there are no updates and although it is relatively easy to use I don't like some of it.  I'd like to make a gallery for my photography site and I don't like the way iweb handles it