It seems illogical that a column would not exist from the query. Could you
post the query that is being run?
As to your display issue...
<cfif structKeyExists([qName],'[colName]')>
<td>#[qName].[colName]#</td>
<cfelse>
<td>0</td>
</cfif>
One of these per column...
----------------------------------
William Seiter
-----Original Message-----
From: Torrent Girl [mailto:[email protected]]
Sent: Wednesday, December 10, 2014 4:29 PM
To: cf-talk
Subject: Re: Creating columns that aren't included in a query result
Russ there is only one loop.
It's a very simple table with a static first row with headers and a simple
query loop to add columns.
So here is my header row:
Agree, Disagree, Neither Agree nor Disagree, Strongly Agree, Strongly
Disagree
And here is my dynamic row created from the query:
Agree, Disagree, Strongly Agree, Strongly Disagree
So, if 'Neither Agree nor Disagree' is not returned from the query, I am
short of one cell and it throws it off.
I need to create an empty cell for each one that wasn't returned.
>why do you need the 2nd loop rather than simply outputting the value of
>the query column from the main loop?
>
>On Thu, Dec 11, 2014 at 12:02 AM, Torrent Girl <[email protected]>
>wrote:
>
>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359808
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm