Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

call cfc from the another cfc

Guest
Feb 23, 2015 Feb 23, 2015

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>

TOPICS
Getting started
443
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 18, 2015 Mar 18, 2015

  <cffunction name = "getOpt">

    <cfset itemDesc =  getItem() />

    <cfset item = itemDesc['codeItem']>

  </cffunction>

Translate
Community Expert ,
Mar 18, 2015 Mar 18, 2015
LATEST

  <cffunction name = "getOpt">

    <cfset itemDesc =  getItem() />

    <cfset item = itemDesc['codeItem']>

  </cffunction>

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