You could treat it as two separate queries, each of which feed a segment of
the select list.  So, in half-pseudo-sortof-code:

<CFQUERY name="GetTargetDept"...>
        SELECT NEEDEDCOLUMNS
        FROM TABLE
</CFQUERY>

<CFQUERY name="GetOtherDepts"...>
        SELECT NEEDEDCOLUMNS
        FROM TABLE
</CFQUERY>

<SELECT name=...>
        <CFOUTPUT query="GetTargetDept">
                <OPTION...>
        </CFOUTPUT>
        <CFOUTPUT query="GetOtherDepts">
                <OPTION...>
        </CFOUTPUT>
</SELECT>

So you are just stacking the results from one query on top of the other.
I'm sure that your means of generating the department information are
probably different, but I imagine that this should work nonetheless.

Matthieu


-----Original Message-----
From: Adams, Stephen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 5:11 AM
To: CF-Talk
Subject: Problem with a dynamic menu and loops.


**********************************************************************
WESTMINSTER CITY COUNCIL
Please refer to the disclaimer beneath this message
**********************************************************************

Hi,

I am building an Intranet that has a menu for the company departments.  This
menu is populated by a query that returns the department name, title,
description, filename and the page URL. When a Department is selected the
page goes to that particular departments homepage and the menu expands to
display all the pages underneath that department, e.g. 

        Human Resources
         - Holiday Form
         - Sick Pay
         - Contact HR

My problem is that I want to have the selected department appear at the top
of my series of departments, and still keep the other departments in
alphabetical order.  So I'd have:

        Human Resources
         - Holiday Form
         - Sick Pay
         - Contact HR
        Customer Service
        Finance
        Planning

Has anyone tried something like this before, or has any idea how I can do
this?

Thanks

Stephen


**********************************************************************
Westminster City Council switchboard: 
+44 20 7641 6000
**********************************************************************
This E-Mail may contain information which is 
privileged, confidential and protected from 
disclosure.  If you are not the intended recipient 
of this E-mail or any part of it, please telephone 
Westminster City Council immediately on receipt.
You should not disclose the contents to any other 
person or take copies.
**********************************************************************


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to