Highlighted

call cfc from the another cfc

New Here ,
Feb 23, 2015

Copy link to clipboard

Copied

Hi,

  I want to be able to get the value of the CodeItem  from the getItem function to use for my second function getOpt.  But not sure how to do it, would you lend me a hand?- Thanks


<cffunction name="getItem" access="remote" returntype="struct">

    <cfargument name="wo" type="string" required="yes">

      <cfsetvarqResult="" />

       <cfsetvarresult = {} />

        <cfqueryname="qResult">

          SELECT * fromsaleorders

         whereprodOrder= <cfqueryparamvalue="#arguments.wo#" cfsqltype="cf_sql_varchar"/>

        </cfquery>

      

         <cfsetresult = {CodeItem="#qResult.Code#",Description=#qResult.Description#} />

    <cfreturnresult>

  </cffunction>

  <cffunctionname ="getOpt">

    <cfsetitemDesc=  getItem() />

  </cffunction>

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

  <cffunction name = "getOpt">

    <cfset itemDesc =  getItem() />

    <cfset item = itemDesc['codeItem']>

  </cffunction>

TOPICS
Getting started

Views

352

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

call cfc from the another cfc

New Here ,
Feb 23, 2015

Copy link to clipboard

Copied

Hi,

  I want to be able to get the value of the CodeItem  from the getItem function to use for my second function getOpt.  But not sure how to do it, would you lend me a hand?- Thanks


<cffunction name="getItem" access="remote" returntype="struct">

    <cfargument name="wo" type="string" required="yes">

      <cfsetvarqResult="" />

       <cfsetvarresult = {} />

        <cfqueryname="qResult">

          SELECT * fromsaleorders

         whereprodOrder= <cfqueryparamvalue="#arguments.wo#" cfsqltype="cf_sql_varchar"/>

        </cfquery>

      

         <cfsetresult = {CodeItem="#qResult.Code#",Description=#qResult.Description#} />

    <cfreturnresult>

  </cffunction>

  <cffunctionname ="getOpt">

    <cfsetitemDesc=  getItem() />

  </cffunction>

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

  <cffunction name = "getOpt">

    <cfset itemDesc =  getItem() />

    <cfset item = itemDesc['codeItem']>

  </cffunction>

TOPICS
Getting started

Views

353

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
Feb 23, 2015 0
Adobe Community Professional ,
Mar 18, 2015

Copy link to clipboard

Copied

  <cffunction name = "getOpt">

    <cfset itemDesc =  getItem() />

    <cfset item = itemDesc['codeItem']>

  </cffunction>

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
Reply
Loading...
Mar 18, 2015 0