Skip to main content
Inspiring
August 11, 2009
Question

Drop Down List not sorting correctly

  • August 11, 2009
  • 1 reply
  • 1385 views

Hi,

I have a query that I use in a drop down form. NOMEN.GENERIC_NOMEN is the values that I want displayed in the drop down

While the value I want to select is NOMEN.NOMENCLATURE_ID.

Here is the underlying Query (notice it is sorted by the form values that I want to display)

<cfquery name="NOMEN" datasource="ilmf_parts_dev" blockfactor="100">
SELECT *
FROM NOMEN_TABLE
ORDER BY GENERIC_NOMEN ASC
</cfquery>

Here is the code for that part of the form:

<td width="96" class="style1">Nomenclature</td>
      <td width="379" class="style1"><cfselect name="Add_Inv_Nomen">
          <cfoutput query="NOMEN">
            <option value="#NOMEN.NOMENCLATURE_ID#">#NOMEN.GENERIC_NOMEN#</option>
          </cfoutput>
      </cfselect>      </td>

For some reason, the drop down displays the text in the order of the table index instead of alphabetically in ASC order.

Any Ideas?

Eric

Ps     Running off of Oracle 11g DB.

    This topic has been closed for replies.

    1 reply

    Known Participant
    August 11, 2009

    What's the outcome if you cfdump the query results?

    Inspiring
    August 11, 2009

    It does not come out in alphabetical order (seems like it should !)

    Look at how the Printer entries are broken up...

    Eric

    query
    GENERIC_NOMENNOMENCLATURE_ID
    1DRIVE, DVD4
    2PRINTER , ROLLER39
    3PRINTER, FUSER40
    4PRINTER, KIT41
    5AC ADAPTER22
    6BATTERY35
    7CABLE12
    8CARD, CONTROLLER38
    9CARD, NIC7
    10CARD, SOUND17
    11CARD, VIDEO15
    12COMPUTER8
    13CPU13
    14DIMM3
    15DRAC MODULE27
    16DRIVE, CD ROM19
    17DRIVE, FLOPPY37
    18DRIVE, REMOVABLE32
    19DRIVE, ZIP33
    20FAN20
    21FIBER MODULE30
    22FIBER OPTIC MODULE18
    23HARD DRIVE1
    24KEYBOARD2
    25MONITOR6
    26MOTHER BD, COMPUTER26
    27MOUSE23
    28NETWORK SWITCH25
    29NUT, RETAINING29
    30POWER SUPPLY5
    31PRINTER9
    32PRINTER, CARD16
    33PRINTER, PART43
    34PRINTER, TRANSFER11
    35RAM, NV21
    36SCREW, PHILLIPS HEAD28
    37SPEAKER(s)14
    38SWITCH24
    39TERMINAL, RS23231
    40TESTER, AC POLARITY36
    41TONER CARTRIDGE10
    42TRANCEIVER MODULE34
    43UNKNOWN NOMENCLATURE0
    CACHEDfalse
    EXECUTIONTIME0
    SQLSELECT * FROM NOMEN_TABLE ORDER BY GENERIC_NOMEN ASC
    Known Participant
    August 11, 2009

    Another simple/dumb question but will help trace the issue...

    Can you run the same statement directly inside of the oracle environment, apart from coldfusion, and see what the result set is if you haven't already?