Well I came up with one way.

|<!--- loop over and create master list of unique values by creating a temp 
structure --->
<cfset masterList = structNew()>
<cfloop collection="#positions#" item="type">
    <cfloop list="#structKeyList(positions[type])#" index="item">
      <cfset masterList[item] = "">
  </cfloop>
</cfloop>

<!--- extract master list --->
<cfset masterList = listSort(structKeyList(masterList),"textNoCase")>

<cfoutput>
<table border="1">
    <tr>
  <cfloop list="#listSort(structKeyList(positions),'textNoCase')#" index="type">
      <th>#type#</th>
  </cfloop>
  </tr>
<!--- loop over master list to display table of all elements ---->
<cfloop list="#masterList#" index="key">
    <tr>
  <!--- loop over each of the contributint lists --->
  <cfloop collection="#positions#" item="type">
      <!--- if the current list has the current item, display item --->
      <td><cfif structKeyExists(positions[type],key)>#key#</cfif></td>
  </cfloop>
  </tr>
</cfloop>
</table>
</cfoutput>
|



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326715
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to