passing structures using cfinvoke.

Ask a Question related to Coldfusion Component Development, Design and Development.

  1. #1

    Default passing structures using cfinvoke.

    Quick question.

    Can I create a structure in a cfc and then return in? If so does anyone have a simple example. Thanks.


    SilentBob'secretfusion Guest

  2. Similar Questions and Discussions

    1. CFInvoke Tag... dumb question
      Hi, I would like to know if the CFInvoke tag is available for all versions of CF or just CFMX7? Is it supported on a default install? If not,...
    2. CFINVOKE
      Hi, I've a problem invoking 2 cfc's in one function which has same return variable. please see the below code. my question is how does it affect...
    3. CFINVOKE Web Services Problem
      First to say I know nothing about SOAP, XML etc but need to connect to a webservice. Running the attached code just generates a HTTP/1.1 405 Method...
    4. cfinvoke calling web service
      I'm having trouble consuming a web service with cfinvoke. The service is called fetchUserInfo. Here is what I'm trying to use: <cfinvoke...
    5. using cfinvoke
      Can I use <!--- file abc.cfc---> <cfcomponent> <cffunction> <cfquery> </cfquery> <cfreturn xyz> </cffunction> </cfcomponent>
  3. #2

    Default Re: passing structures using cfinvoke.

    This function returns a structure. The structure is made up of strings and
    a query.


    <cffunction name="cfhttpmydomainphonelist" returntype="struct"
    output="true">
    <cfargument name="myuserfname" required="yes"/>
    <cfargument name="myuserlname" required="yes"/>

    <cfhttp url="http://mydomain/IT/IntTools/Phones/PhoneList.txt"
    method="get" name="phonelist"
    columns="LastName,FirstName,Extension,Cell,Pager,C ubeLocation,DateModified"/>

    <cfquery name="phonelist" dbtype="query">
    SELECT *
    FROM phonelist
    WHERE Lower(LASTNAME) like <cfqueryparam value =
    '#lcase(arguments.myuserlname)#' CFSQLType = "CF_SQL_VARCHAR">
    AND Lower(FIRSTNAME) like <cfqueryparam value =
    '#lcase(arguments.myuserfname)#%' CFSQLType = "CF_SQL_VARCHAR">
    </cfquery>

    <cfscript>
    results = StructNew();
    StructInsert(results, "statuscode", cfhttp.statuscode);
    StructInsert(results, "query", phonelist);
    StructInsert(results, "recordcount", phonelist.recordcount);
    </cfscript>

    <cfreturn results>
    </cffunction>


    "SilentBob'secretfusion" <webforumsuser@macromedia.com> wrote in message
    news:cv2c9b$7lc$1@forums.macromedia.com...
    > Quick question.
    >
    > Can I create a structure in a cfc and then return in? If so does anyone
    > have a simple example. Thanks.
    >
    >

    Bill Sahlas Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139