Highlighted

CFclient return "undefined"

New Here ,
Apr 22, 2015

Copy link to clipboard

Copied

Hello,

I'm new in ColdFusion development and I'm trying return some value from de function on component.

But independent of the return type, the value is aways "undefined".

This is my function:

<cffunction name="getAll" returntype="query" access="remote" returnformat="JSON"

  hint="Fetches employee rows from Employee table and returns array of EmployeeTO components">

  <cfquery datasource="cg_sindicontaba" name="empRs" result="test">

  select * from tab_001_tes_car

  </cfquery>

  <cfreturn empRs>

  </cffunction>

And here I call:

<cfset empMgr = new cfc_tes_car_mob() />

<cfset qEmp = empMgr.getAll() />

Thanks.

TOPICS
Builder

Views

273

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

CFclient return "undefined"

New Here ,
Apr 22, 2015

Copy link to clipboard

Copied

Hello,

I'm new in ColdFusion development and I'm trying return some value from de function on component.

But independent of the return type, the value is aways "undefined".

This is my function:

<cffunction name="getAll" returntype="query" access="remote" returnformat="JSON"

  hint="Fetches employee rows from Employee table and returns array of EmployeeTO components">

  <cfquery datasource="cg_sindicontaba" name="empRs" result="test">

  select * from tab_001_tes_car

  </cfquery>

  <cfreturn empRs>

  </cffunction>

And here I call:

<cfset empMgr = new cfc_tes_car_mob() />

<cfset qEmp = empMgr.getAll() />

Thanks.

TOPICS
Builder

Views

274

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 22, 2015 0

Have something to add?

Join the conversation