• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Headers for each change in a Cfoutput

Community Beginner ,
Jun 17, 2014 Jun 17, 2014

Copy link to clipboard

Copied

I and trying to do an output that will list the name of a apartment complex and it's corresponding task each time that their apartment number changes

<cfquery name="Running_list" datasource="c124805-h217079">

SELECT Lisid, LisUnitNo, LisTask,  LisNotes,  LisStatus,  LisPriority, Lisduedate, lissideoftown, proname

FROM listrun

LEFT JOIN property ON LisUnitNo = proid

ORDER BY LisUnitNO, LisPriority desc, Lisduedate

</cfquery>



my output code looks like this


<cfoutput query="running_list">

#Running_list.proName# - Priority: #Running_list.LisPriority#<br />

#Running_list.LisStatus#

#Running_list.LisTask#<br></cfoutput>

My displayed drill-down result to looks like this:

HMC 508 NAS - Priority: 3

Install Carpet inside of Coat closet


HMC 508 NAS - Priority: 3

Install Doorstop behind the kitchen door so that it will not hit the cabinet.

HMC 508 NAS - Priority: 3

Paint the inside of the rear kitchen door

HMC 508 NAS - Priority: 3

Check the HVAC closet PVC pipe

HMC 508 NAS - Priority: 3

Clean Paint from the mini-blind in living room

HMC 508 NAS - Priority: 3

Touch-up paint closet double door in back bedroom.

----------

AV 102B NAS

1. ShopVac HVAC Closet

2. Spray Foam all HVAC Openings and Enclose the line-set inside of PVC.



I want my result to looks like this:


HISTORIC MANOR COMMUNITY

Apartment 508 NAS

1. Install Carpet inside of Coat closet

2. Install Doorstop behind the kitchen door so that it will not hit the cabinet.

3. Paint the inside of the rear kitchen door

4. Check the HVAC closet PVC pipe

5. Clean Paint from the mini-blind in living room

6. Touch-up paint closet double door in back bedroom.

----------

ALPINE VILLAGE

Apartment 102-B 

1. ShopVac HVAC Closet

2. Spray Foam all HVAC Openings and Enclose the line-set inside of PVC.




Is it the way that i am doing the cfoutput code?

Views

410

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Jun 17, 2014 Jun 17, 2014

If you want to group by the Apartment name then you can use the group attribute of cfoutput, and specify the column that uniquely identifies the apartment (LisUnitNO perhaps), then you can nest another cfoutput tag inside that to list each record in that group. Make sure the column in the group attribute is also in your SQL order by attribute.

For example:

<cfoutput query="running_list" group="LisUnitNO">

   #running_list.ProName#

   <ol>

      <cfoutput>

          <li>#rulling_list.LisTask#</li>

     

...

Votes

Translate

Translate
Enthusiast ,
Jun 17, 2014 Jun 17, 2014

Copy link to clipboard

Copied

LATEST

If you want to group by the Apartment name then you can use the group attribute of cfoutput, and specify the column that uniquely identifies the apartment (LisUnitNO perhaps), then you can nest another cfoutput tag inside that to list each record in that group. Make sure the column in the group attribute is also in your SQL order by attribute.

For example:

<cfoutput query="running_list" group="LisUnitNO">

   #running_list.ProName#

   <ol>

      <cfoutput>

          <li>#rulling_list.LisTask#</li>

      </cfoutput>

   </ol>

</cfoutput>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation