1 Reply Latest reply on Aug 12, 2014 6:47 AM by BKBK

    Invalid column name for the group attribute.

    meensi Level 2

      Hi,

      Please help, I m struck with this for the past 2 days.

       

      Basically i have  big query and with cfoutput and group attribute; i m displaying hte results..

      It has 4 levels of grouping.

       

      Also, the grouping column will be different every time the user choose it.so I'm building an array to do it.

      Suppose the user choose only 3 columns, I'm manually adding the 4th column so that array has 4 values all the time.

       

      At time, i m getting this error, the column name is invalid.

      Your help is highly appreciated.

       

      <cfoutput query="mtburbycust" group="#lstSQLOrderBy[1]#">

                <cfif currentRow EQ 1>

                    <cfset rowColor2 = 'CECE9E'/>

                 

               <cfelse>

                   <cfif isdefined('Prevcolor')>

                      <cfif comparenocase(Prevcolor,rowColor3) EQ 0>

                          <cfset rowColor2 = 'A8E4FF'/>

                      <cfelse>

                          <cfset rowColor2 = 'CECE9E'/>

                      </cfif>

                  </cfif>

                 

                </cfif>

                  

             

                <cfset Rowcolor = Rowcolor2/>

                 <cfset Prevcolor = Rowcolor2/>

       

         

               <cfoutput group="#lstSQLOrderBy[2]#">       

       

                    <cfoutput group="#lstSQLOrderBy[3]#">

                     

       

                  <cfoutput group="#lstSQLOrderBy[4]#">    

                     <cfoutput>

      </cfoutput>

      </cfoutput>

                           

                          </cfoutput>

                     

                      </cfoutput>

                  </cfoutput>

              </cfoutput>