Title: Message
Try adding a boolean flag:
 
<set FirstNewItem = "True">
<ol type="1">
    <cfoutput query="list" group="field1">
    <cfif field1 CONTAINS "NEW">
        <cfif FirstNewItem = "True"> <!--- Start Ordered List for "NEW" --->
    
    <li>NEW
            <ol type="A">
            <set FirstNewItem = "False">
        </cfif>

            <cfoutput group="field1">
                <li>#field1#
                    <ol type="1">
                    <cfoutput group="field2">
                    <li>#field2# - #field3#<p>
                    </cfoutput>
                    </ol>
            </cfoutput>
    <cfelse>
        <cfif FirstNewItem = "False"> <!--- End Ordered List for "NEW" if more list items follow --->
           
</ol>
            <set FirstNewItem = "True">
        </cfif>

        <li>#field1#
            <ol type="A">
            <cfoutput group="field2">
                <li>#field2# #field3#
            </cfoutput>
            </ol>
    </cfif>
    </cfoutput>
    <cfif FirstNewItem = "False"> <!--- End Ordered List for "NEW" if no list items follow "NEW" items --->
       
</ol>
        <set FirstNewItem = "True">
    </cfif>

</ol>
 
Randy Ellis
Senior Programmer Analyst
City of Overland Park
-----Original Message-----
From: Chris Holdman [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 12:29 PM
To: '[EMAIL PROTECTED]'
Subject: [KCFusion] outine gouping problems

I have a query output I am trying to group into an outline form.  Below is the outline formatt I am trying to achieve.  Under III. I have several rows that have 'NEW' in them and want to expand just that portion of the outline.  The problem I get is that every row returning 'NEW' is starting a new Roman Numeral instead of staying under III. and starting a new row with 'A', 'B', 'C', etc.  I have supplied my code below.  I am sure I am doing something wrong, but I can't find it.
 
I. FIELD 1
    A. FIELD 2 - FIELD 3
    B. FIELD 2 - FIELD 3
 
II. FIELD 1
    A. FIELD 2 - FIELD 3
    B. FIELD 2 - FIELD 3
 
III. NEW
    A. FIELD 1
        1. FIELD 2 - FIELD 3
        2. FIELD 2 - FIELD 3
    B. FIELD 1
        1. FIELD 2 - FIELD 3
        2. FIELD 2 - FIELD 3
 
IV. FIELD 1
    A. FIELD 2 - FIELD 3
    B. FIELD 2 - FIELD 3
 
 
<ol type="1">
    <cfoutput query="list" group="field1">
    <cfif field1 CONTAINS "NEW">
        <li>NEW
            <ol type="A">
            <cfoutput group="field1">
                <li>#field1#
                    <ol type="1">
                    <cfoutput group="field2">
                    <li>#field2# - #field3#<p>
                    </cfoutput>
                    </ol>
            </cfoutput>
            </ol>
    <cfelse>
        <li>#field1#
            <ol type="A">
            <cfoutput group="field2">
                <li>#field2# #field3#
            </cfoutput>
            </ol>
    </cfif>
    </cfoutput>
</ol>
 
 
 
Christopher V. Holdman
Webmaster - City of Olathe
work: 913.971.6286
cell: 913.238.4681
 

Reply via email to