Avatar of mchristopher
mchristopher
Flag for United States of America asked on

ColdFusion bind fails

The following bind fails:
              <!--- values for PE category - Outyears Budget Information --->
                    <cfselect name="pecat_#i#" style="width:80px;" >
                              <option value=""></option>                  
                              <cfloop list= "#ValueList(qryCPecat.pecat)#" index="j" >
                                   <option value="#j#" <cfif j eq qryOBudget.pecat>selected</cfif>>#j#</option>
                              </cfloop>
                          </cfselect>  
 <!--- Outyears Budget Information --->    
                    <cfset myqryGetPECode = manpowerObj.funcGetPECode(pecat = qryOBudget.pecat) >
               
                <!--- QUESTION: how to bind to this withing the outer loop <cfloop from="#session.fiscal + 1#" to="#session.fiscal + 4#" index="i"> --->
                         <cfselect name="peccode_#i#" value="code" display="code"
                selected="#qryOBudget.peccode#" queryPosition="below" style="width:60px;"
                bind="myqryGetPECode({pecat_#session.fiscal#})"
                         bindonload="yes">
                      <option value=""></option>
                </cfselect>
AJAXColdFusion Language

Avatar of undefined
Last Comment
mchristopher

8/22/2022 - Mon
mchristopher

ASKER
Yet the following script succeeds:
   <cfselect name="pecat_#session.fiscal#" id="pecat_#session.fiscal#" required="yes"
         validateat="onSubmit" message="Please select a DMA Function Code">  
            <option value=""></option>                  
            <cfloop list= "#ValueList(qryCPecat.pecat)#" index="i" >
                 <option value="#i#" <cfif i eq qryCBudget.pecat>selected</cfif>>#i#</option>                
            </cfloop>
        </cfselect>
       <cfselect name="peccode_#session.fiscal#" value="code" display="description"
             selected="#qryCBudget.peccode#"
             bind="cfc:manpower_test.qryPECDescription({pecat_#session.fiscal#})" bindonload="yes"  
             queryPosition= "below" validateat="onSubmit" required="yes"  message="Please select a PEC Code">
                  <option value=""></option>  
         </cfselect>
_agx_

Fails how?  Can you post any CF error messages / messages from your Ajax logs.
mchristopher

ASKER
error:bind: Bind failed for select box peccode_2016, bind value is not a 2D array or valid serialized query

error:bind: Bind failed for select box peccode_2015, bind value is not a 2D array or valid serialized query

error:bind: Bind failed for select box peccode_2014, bind value is not a 2D array or valid serialized query

error:bind: Bind failed for select box peccode_2013, bind value is not a 2D array or valid serialized query
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
_agx_

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
mchristopher

ASKER
Thank you very much. I will test this at 8 AM EST tomorrow (no VPN login available this evening) and credit by time stamp and effectiveness.
mchristopher

ASKER
This was very helpful, thanks. It took me a few tries to get it working at the loop within an outer loop.
Thanks again.