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

Nested output

New Here ,
Apr 30, 2007 Apr 30, 2007

Copy link to clipboard

Copied

I'm not sure it can even be done.

After I output it I then have to put conditional formating.
http://airchathams.selous.nzoffice.com/roster/rosterheaderpage2.htm

Some people have two duties Mon 9th Oct @ Thur 19th Oct (confusing to output)
When output the days with only one duty are repeated which I dont want.
I need maybe conditional code.
Is there a better way of doing this or am I on the right track
Thankyou

<body>
<table id="mytable" cellspacing="0" summary="">
<caption>Fortnightly Roster</caption>
<tr>
<th scope="col" abbr="Configurations" class="nobg"></th>
<cfoutput>
<cfloop query="Date">
<th scope="col" abbr="Dual 2.5" colspan="3">#DateFormat(Date.DFRDate,'DDD')#<br>
#DateFormat(Date.DFRDate,'DD-MMM')#</th>
</cfloop>
</tr>
<cfloop query="crew">
<cfset tisCrew = Crew.CrewID>
<cfset rownumber = #currentrow#>
<tr>
<td class="spec" rowspan="4">#tisCrew#</td>
<cfloop query="date">
<cfif structKeyExists( fly, "#tisCrew#|#DFRDate#" )>
<CFSET startduty = #structFind( fly, "#tisCrew#|#DFRDate#" )#>
<CFSET dutytype = #structFind( dutytest, "#tisCrew#|#DFRDate#" )#>
<CFSET aa =date.currentrow>
<td rowspan="2">#dutytype#</td>
<td><a href="styles.css?num = #rownumber#">X</a></td>
<td>#TimeFormat(Startduty,'HHmm')#</td>

<cfelse>
<td rowspan="2"> </td>
<td> </td>
<td> </td>
</cfif>
</cfloop>
</tr>
<tr>
<cfloop query="date">
<cfif structKeyExists( fin, "#tisCrew#|#DFRDate#" )>
<CFSET endduty = #structFind( fin, "#tisCrew#|#DFRDate#" )#>
<CFSET aa =date.currentrow>
<td><a href="styles.css">X</a></td>
<td>#TimeFormat(endduty,'HHmm')#</td>
<cfelse>
<td> </td>
<td> </td>
</cfif>

</cfloop>
</tr>
<cfloop query="date">
<cfif structKeyExists( fly2, "#tisCrew#|#DFRDate#" )>
<CFSET startduty = #structFind( fly2, "#tisCrew#|#DFRDate#" )#>
<CFSET dutytype = #structFind( dutytest, "#tisCrew#|#DFRDate#" )#>
<CFSET aa =date.currentrow>
<td rowspan="2">#dutytype#</td>
<td><a href="styles.css?num = #rownumber#">X</a></td>
<td>#TimeFormat(Startduty,'HHmm')#</td>
<cfelse>
<td rowspan="2"> </td>
<td> </td>
<td> </td>
</cfif>

</cfloop>
</tr>
<tr>
<cfloop query="date">
<cfif structKeyExists( fin2, "#tisCrew#|#DFRDate#" )>
<CFSET endduty2 = #structFind( fin2, "#tisCrew#|#DFRDate#" )#>
<td><a href="styles.css">X</a></td>
<td>#TimeFormat(endduty2,'HHmm')#</td>
<cfelse>
<td> </td>
<td> </td>
</cfif>
</cfloop>
</tr>
</cfloop>
</table>
</cfoutput>
</body>
TOPICS
Advanced techniques

Views

260

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
LEGEND ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

LATEST
Read the cfoutput section in the cfml reference manual. Pay particular attention to the example which shows the group attribute.

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