Skip to main content
Known Participant
May 5, 2008
Question

CFC - function not found.

  • May 5, 2008
  • 1 reply
  • 367 views
Can anyone see why this is not working? I am pulling my hair out. I have setup autosuggest to bind to a CFC before without a problem, but getting VERY wierd results with this one. Can anyone see what is wrong here?? I can't !!

Many thanks in advance for any suggestions.



CFINPUT....
<cfinput type="text" name="fMunicipality" id="fMunicipality" class="LrgTextField" maxlength="50" autosuggest="cfc:lu_municipality.getMunicipality{(cfautosuggestvalue)}">



THE CFC
<cfcomponent>

<cffunction name="getMunicipality" access="remote" returntype="array" output="false">

<cfargument name="suggestvalue" required="true">

<cfset var myarray = ArrayNew(1)>

<cfquery name="getMunicipality" datasource="datasource">
SELECT suburb FROM lu_geo_data
WHERE suburb LIKE <cfqueryparam value="#suggestvalue & '%'#" cfsqltype="cf_sql_varchar">
</cfquery>

<cfloop query="getMunicipality">
<cfset arrayAppend(myarray, suburb)>
</cfloop>

<cfreturn myarray>

</cffunction>

</cfcomponent>


THE ERROR COMING BACK
The specified remote function getMunicipality{ was not found on the CFC lu_municipality.


    This topic has been closed for replies.

    1 reply

    Inspiring
    May 5, 2008
    you got your { and ( in the wrong order - it should be
    cfc:cfcpath.functionname({bind control}) - in the bind attribute of your
    cfinput... thus it is looking for function getMunicipality{ ...

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/