Cannot insert item with key deptname. Right 'cause that structure live inside a cfoutput query. My question: how to store all values inside my structure? Or maybe array, I don't know...
Thanx for your time.
>>>>>>>>>>>>>>>>>
My Code
<cfset depts=structnew()>
<cfoutput query="getDeptsAtribsQuestionsRate" group="enterprise_DeptDescr">
#enterprise_DeptDescr#
<HR>
<cfset variables['total_categoryTotal'] = 0 />
<cfset variables['total_categoryTotalnegatives'] = 0 />
<cfset variables['total_category4_5'] = 0 />
<CFOUTPUT group="atribsdescr">
#atribsdescr#
<HR>
<cfset variables['total_category'] = 0 />
<cfset variables['total_category4_5'] = 0 />
<CFOUTPUT>
<CFIF #fkquestion_rateID# IS '4' OR #fkquestion_rateID# IS '5'>
<cfset variables['total_category4_5'] = variables['total_category4_5'] + 1 />
<cfset variables['total_categoryTotalnegatives'] = variables['total_categoryTotalnegatives'] + 1 />
</CFIF>
<cfset variables['total_categoryTotal'] = variables['total_categoryTotal'] + 1 />
<cfset variables['total_category'] = variables['total_category'] + 1 />
Rate: #fkquestion_rateid#
<BR>
</CFOUTPUT>
<BR>
Total Answers: #variables['total_category']#<BR>
Total Negatives Answers: #variables['total_category4_5']#<HR>
<BR>
<cfset values=StructInsert(depts,"deptname","#enterprise_DeptDescr#")>
<cfset values=StructInsert(depts,"atribname","#atribsdescr#")>
<cfset values=StructInsert(depts,"answerstotal","#variables['total_category']#")>
<cfset values=StructInsert(depts,"negativeanswerstotal","#variables['total_category4_5']#")>
<cfloop collection=#depts# item="position">
<tr>
<td>#position#</td>
<td>#depts[position]#</td>
</tr>
</cfloop>
<BR>
</CFOUTPUT>
<CFSET Totalnegatives=(#variables['total_category4_5']#/#variables['total_category']#)*100>
<cfset variables['total_category'] = 0 />
<cfset variables['total_category4_5'] = 0 />
Total->Dept: #variables['total_categoryTotal']#<BR>
Total->Negatives->Dept: #variables['total_categoryTotalnegatives']#<BR>
<BR>
</CFOUTPUT>
<cfset variables['total_category'] = 0 />
<cfset variables['total_category4_5'] = 0 />
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

