2 Replies Latest reply on Oct 2, 2009 7:16 AM by richardELeach

    how do you reference a specific value in a bind value?

    richardELeach Level 1

      Hi-

       

      I'm working with cfform and am doing binds to cfcs, for example:

      <cfinput type="text" name="psistrength" bind="cfc:controller.Controller.getMixPsistrength({mixdesign})" bindattribute="value" bindonload="yes" />

       

      I've listed the cfc's method below. Since my query is returning rows with 4 columns I'd like the freedom to display any of the 4 columns as I need to. Does anyone know how to reference a specific value in:

           ~the cfinput type=text tag, as I described above?

           ~how about if I do a binding from a cfselect value and I want to bind a cfc to a cfgrid, using that cfselect value as the filter for my cfc's method in my bind call?

       

          <cffunction name="getMixPsistrength"  access="remote" returntype="array" output="yes">
             
              <cfargument name="mixdesign" type="string" required="yes" />
             
              <cfset var qGetMixPsistrength= "" />
              <cfset var qPsi=arrayNew(2) />
              <cfset var j=0>
             
              <cfquery name="qGetMixPsistrength" datasource="#request.DSN#">
                  select id, psistrength, colorvalue, pressure
                  from concretemixnumbers
                  where mixnumber='#ARGUMENTS.mixdesign#'
              </cfquery>
             
              <cfloop from="1" to="#qGetMixPsistrength.recordcount#" index="j">
                  <cfset qPsi[j][1]=qGetMixPsistrength.id[j]/>
                  <cfset qPsi[j][2]=qGetMixPsistrength.psistrength[j]/>

                  <cfset qPsi[j][3]=qGetMixPsistrength.colorvalue[j]/>

                  <cfset qPsi[j][4]=qGetMixPsistrength.pressure[j]/>  
              </cfloop>
             
              <cfreturn qPsi/>
          </cffunction>

       

      Thanks in advance,

       

      Rich