Can you order by label of select list in tabular form?

Imagine this scenario, you have an updateable tabular report based on a query like the following:
select emp_id
      ,ename
      ,dept_id
from employeesAnd you define the dept_id column as a query based lov, so you see a select list for departments.
select dept_name d
      ,dept_id   r
from departments
order by 1However if the user chooses to order by the department column by clicking on the heading to sort, they see the following order (note the H between A & B):
Accounting
Human Resources
BiodiversityWhich is because of the ID not being in the same order as the label
1 - Accounting
3 - Biodiversity
2 - Human ResourcesHow can I allow the user to order by the lov based column, but have it order by the label and not the reference id?
A colleague reckons she fought and lost this battle. Surely this must be a common issue? I can't seem to find any related questions.
Cheers,
ScottWe.

>
Option B: Convert to manual tabular form. Here is a sample of the report query (leave column display as at "standard report column").
select e. emp_id
      ,e.ename
      ,'<input type="hidden" value="'||d.dept_name||'" />'||APEX_ITEM.SELECT_LIST_FROM_QUERY(3,e.dept_id,'select dept_name ,dept_id  from departments order by 1') dept
from employees e, departments d
where e.dept_id = d.dept_idI recently had problems when I had to apply a script to a page that used this technique: basically too many <tt>input</tt>s. Never understood why this element is used&mdash;guess it's the fact that it's "hidden". Anyway, an HTML comment works as well and is more out of the way:
select e.empno
      ,e.ename
      ,'<!-- '||d.dname||' -->'||APEX_ITEM.SELECT_LIST_FROM_QUERY(3,e.deptno,'select dept_name ,dept_id  from departments order by 1') dept
from emp e, dept d
where e.deptno = d.deptno

Similar Messages

  • Multiple select lists in tabular form

    Hi,
    I created a tabular form with two select lists (Queries are same for both the select list and results around 300 records in the SQL).
    I am getting the following error:
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    If I changed Select list to POP list, I am not getting error.
    Please suggest how to user select list in this case.
    Regards,
    Meda

    LnTInfotech wrote:
    I created a tabular form with two select lists (Queries are same for both the select list and results around 300 records in the SQL).
    I am getting the following error:
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    If I changed Select list to POP list, I am not getting error.
    Please suggest how to user select list in this case.It is not possible. There is a 32K limit on the HTML generated for select list items. (As a type of report, tabular forms are also subject to the 32K limit on the size of a report row.)
    In terms of usability 200 options is about the maximum size I would consider sensible for a select list ( and for select lists in tabular forms, much, much fewer!)
    Use Popup Key LOVs.

  • Two select lists in tabular form

    I have two Select Lists which one of them depends on the another -the second one's query depends on the first one's - .....
    This operation can be done in a form or a page, but how it could be done in a tabular form???
    Saad

    The simple answer is that to the best of my knowledge, it cannot be done because of how the tabular form works. If I understand it correctly, Tabular forms are populated completely at page load and cannot post back from items inside the form in order to refresh a list of values on the second select list. If you want to do this, you will need to build the form as a "Form and Report" page type where you have links in your report that populate a regular page form. Just tell it to put the form and the report on the same page them add a hidden page item that you set to 1 or 0 to display the form and setup the form processing so it is button tied instead of unconditional (You may have to duplicate auto processing processes).
    The complex answer....there probably is a way to do this using AJAX as AJAX is good at this kind of stuff and every field in the tabular form has an HTML id of some kind....but I am not well versed enough in AJAX to give you a straight answer as to how to accomplish it. I used AJAX to do something similar to what your talking about but it was with regular page items (using a select list to populate a shuttle without a post back) and not items in a tabular form.

  • Cascade Select list with Tabular Form

    Hi,
    I am trying to implement Cascade Select List functionality on a tabular form where users should be able to add multiple rows. The data should be saved to a temporary stage area, where users can review the data prior to saving to the table. Very similar to the shopping cart where one can Delete/Update rows by record. I believe there is a way to do it via APEX Collections. If anyone has an example it would definitely help. FYI, Running on APEX 3.2, so no built in cascade functionality.
    Thank you,
    Chandu

    If you received a reply or figured out how to do this, can post? I need to implement exact same functionality and have not figured out how to do so. Have pinged Denes K. for source code on his demo app but not yet received response. Can this be done using wizard tab form or does it have to be a manually tab form?

  • Help with Cascading Select List in Tabular Form

    Hello Friends,
    I am trying to implement Denes Kubicek's sample for Cascading Select list and ran into this error:
    Please help me identify what I might have missed ???
    <code>
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Only one top level element is allowed in an XML document. Error processing resource 'http://apex.oracle.com/pls/apex/f?p=12...
    <select><option value="0">- Select Employee (0) -</option></select><html lang="en-us" xmlns:htmld...
    </code>
    Please find below the list of activities I performed:
    1.Created the region source
    2.Created the hidden items
    3.Created the buttons and items
    4.Created the application process for MRU and Delete
    5.Created the Application item [ TAB_CASCADING_ITEM]
    6.Created the Application Process[tab_casc_sel_list]
    Any clue/pointers to debug this are welcome.
    I tried the above on apex.oracle.com; WS: CHAITANYAPATCHIPULUSU; USERNAME :[email protected]
    PWD:Satya123 in APPLICATION : 12855 and Page :35
    Regards..

    OK, you didn't have the background process as an on demand process.
    In the MRU and MRD process, you were referencing the wrong variables for the count. (as in deb's case, it's p176, but in your case its p35).
    In the javascript function, the call that is supposed to assign : TAB_CASCADING_ITEM a value, isn't working (I believe).

  • Dynamic Actions in Select List of Tabular Form

    I have a tabular form in my application and one of the column A is Select List with lot of values. My requirement is, there is another column B in the same tabular column like Display text, which should appear when a user select A, B or C in the select list column A. Is it possible, how can I implement it?
    I tried it through Dynamic Actions ->DOM Objects, but I am not sure what is the name of the Select List column value that needs to be specified, it is jst f06 or f06_???. Can someone tell me the exact steps that needs to be followed.

    My mistake, Javascript (and DOM attributes/methods) are case-sensitive. The attribute in question is readOnly, not readonly
    I fixed it on my example page at http://htmldb.oracle.com/pls/otn/f?p=24317:255
    <script type="text/javascript">
    function ro_Item(nd,a){
        var lEl = html_GetElement(nd);
        if (lEl && lEl != false){
           if(a){
          lEl.readOnly = true;
          lEl.style.background = '#cccccc';
        }else{
          lEl.readOnly = false;
          lEl.style.background = '#ffffff';
         return true;
    function foo(pThis)
    var lTD=pThis.parentNode;
    var nextinput=lTD.nextSibling.getElementsByTagName('input')[0];
    var nextnextinput=lTD.nextSibling.nextSibling.getElementsByTagName('input')[0];
    if (pThis.value=="CLERK") {
      ro_Item(nextinput,true);
      ro_Item(nextnextinput,true);
    else {
      ro_Item(nextinput,false);
      ro_Item(nextnextinput,false);
    </script>

  • Can images be displayed in a Select List ?

    Hi,
    I was wondering if it is possible to display images in a select list.
    For example to display status colors like "red", "green" and "yellow" so that
    the user can click the select list and select the item by its color.
    I would then return a number or a varchar2 (e.g. 'red', 'green' and 'yellow) in
    the LOV.
    In addition I need that select list on a form.
    I tried something with a static select like this:
    STATIC:[<img src="#WORKSPACE_IMAGES#red.gif">];[1],[<img src="#WORKSPACE_IMAGES#green.gif">];[2],[<img src="#WORKSPACE_IMAGES#yellow.gif">];[3]
    But it did not work. Instead of the numbers I would/could use also a varchar2 as mentioned.
    Is that possible somehow?
    Thank you very much.
    Johnny

    HI Marcello,
    yes, I know that possibility. I even use images myself in reports.
    I tried to do it the same way.
    Something like:
    STATIC:wwv_flow_file_mgr.get_file?p_security_group_id=22705712812657001&p_fname=1.gif;1,#APP_IMAGES#2.gif;2
    But both of the ways do not work.Always the text "wwv_flow_file_mgr.get_file?p_security_group_id=22705712812657001&p_fname=1.gif" itself is being displayed. :-(
    Nevertheless...thank you Marcello.
    Johnny

  • How can you change your line access selection?  I have found where you can change your plan selection, but can you change the line access fee or is that a set amount?

    How can you change your line access selection?  I have found where you can change your plan selection, but can you change the line access fee or is that a set amount?

        DIVAB71,
    Great question. The line access fees for the account are a set amount and can not be changed unless you are going from a basic to a smartphone or vice versa. If you are wondering about adding the month to month discount if you are out of contract Ann154 has provided great information on how to access and add the feature.
    LindseyT_VZW
    Follow us on Twitter @VZWSupport

  • Can you make address labels in Pages?

    Can you make address labels in Pages?

    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=182&highlight=labels &mforum=iworktipsntrick
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=245&highlight=labels &mforum=iworktipsntrick
    Peter

  • Can you edit or remove from reading list in Safari?

    Can you edit or remove from reading list in Safari?

    Yes, swipe from right to left across the title of the reading list item and then touch the red Delete which appears.

  • Can you set up group distribution email lists in the IPAD 2?

    Can you set up group distribution emails lists in the IPAD 2?

    Yep, same request. Apple, get on that.
    Macbook 2Ghz, black, 2GB   Mac OS X (10.4.7)  

  • Can you order apple books in 2 sizes

    Can you order apple books in 2 sizes, once they are built, same picts, order...?

    No. Multiple copies of one order can be combined, but not multiple orders. And two books at different sizes are two orders.

  • Can you delete custom labels created in the contact list?

    The subject pretty much sums up my question! Can you do this on the iPhone?

    Not sure what you mean by "Custom Labels in the contact list"
    But to the best of my knowledge nothing that even has to do with the contact list is customizable other than entries you put in

  • Can you reorder items in the reading list?

    Simple question
    Can you reorder items that are saved in your Safari Reading list?  For example, move some items to the top or rearrange them so the ones on the same topic or from the same website are next to each other?  I would think this would be something simple to do but I cant seem to do it.  I just see how you can show the ones youve read (which usually just means youve clicked on them) but had no luck when trying to drag to rearrange them

    Yes you can with a little forethought. Select from the Reading List the page you want at the top. You will now see this as the usual Safari view. Use the normal procedure for adding a new page to the Reading List. The desired page will now be at the top. Try this for one item. You can then organise on paper the order you want remembering that the most recent action will appear at the top. Longwinded but it works.

  • Can I use dynamic select list in task form?

    Hi
    If I need to chage text input in task form to select list which dynamic from some database, Can I do it? If I can, how to do its ?
    Thanks
    User520932

    If you mean that you want to change the 'outcome' list of the human task, then this is not possible.
    Marc
    http://orasoa.blogspot.com

Maybe you are looking for

  • Problem with Nokia Asha 200 apps

    Hello guys, I am using Nokia Asha 200 and i am quite satisfy with this phone. The only drawback that i can find is that i cannot ue it social prebuild apps, like Social and i cannot use the e-mail app as well. When i open them and accept the license,

  • Automatically login the user when he clicks on a URL in Adobe Form

    Hi Experts, Am currently working on the e-recruitment module & have a query pertaining to Adobe Forms. As per client requirement the offer letters are despatched to the candidates in the form of an Adobe Form. This form will contain a URL to a 3rd pa

  • Mac Mini sound mid 2007

    My mac mini does not have any sound when booting nor in applications mid 2007. Could someone help me...

  • Mac Mini auto disconnects external drives

    Disconnects external drives using USB 3.0 drives were attached to Windows XP machine drives have no password/lock.  Genius Bar tried as well same results, tried using new MacBook Pro same result suspect software OS X issue looking for work around to

  • Possible virus or malware threat?

    Hello. After having a pen drive flash on windows being accused of being infected with an autorun.exe type of virus lying in an invisible folder, I initially thought it could be something Kingston pre-installed on the pen drive or maybe something from