Hey, answered my own quetion... figured I'd post it here in case it helped
anyone else...
So... you're using an <mx:WebService> to call a ColdFusion CFC. The
ColdFusion query object returned in lastResult is an array inside an array,
but, it's more than that too (the debugger is your friend) so... the easiest
way to grab a specific value from specific row in a query is to refer to the
query row by array notation and the column by name... so... to grab the
FULLNAME column from row 1 of your query object's result set you'd use...
var mystr : String = MyWebService.myOperation.lastResult[0].FULLNAME;
and if you wanted to bind to that purely in mxml you could also use...
<mx:ArrayCollection id="ac" source="MyWebService.myOperation.lastResult" />
<mx:TextArea text={ac.getItemAt(0).FULLNAME}" />
Darren
>From: "Darren Houle" <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: [flexcoders] Similar Node Access Question
>Date: Wed, 23 Aug 2006 13:54:19 -0400
>
>Don't know if this is the same problem as my recent, previous post, or if
>it's different, but I basically have the same question...
>
>Now I'm calling a CF WebService that returns a Query object... it just
>contains one row, one column, called FULLNAME.
>
>Using the WebService lastResult in a DataGrid's dataprovider works fine,
>there's a million examples of that, but trying to pull out that FULLNAME
>cell's string value is proving to be a challenge for me...
>
><?xml version="1.0" encoding="utf-8"?>
><mx:Application
> xmlns:mx="http://www.adobe.com/2006/mxml"
> creationComplete="IACleanService.authenticateUser.send()">
>
> <mx:WebService id="IACleanService"
>wsdl="http://localhost/ia_cleanup.cfc?wsdl">
> <mx:operation name="authenticateUser">
> <mx:request xmlns="">
> <username>jsmith</username>
> <password>asdf1234</password>
> </mx:request>
> </mx:operation>
> </mx:WebService>
>
> <mx:DataGrid height="400" width="400"
> dataProvider="{IACleanService.authenticateUser.lastResult}" />
>
> <mx:TextArea width="400" height="400"
> text="{IACleanService.authenticateUser.lastResult.fullname}" />
>
></mx:Application>
>
>The DataGrid above displays the FULLNAME field just fine, but the TextArea
>displays nothing. Doesn't help to uppercase it to lastResult.FULLNAME
>either.
>
>I'm probably missing something really simple, but... just about all the
>examples in the Flex documentation either show how to pull out a single
>node
>value from an HTTPService... or show how to use a WebService in a
>DataGrid... but I can't find any examples where single values are pulled
>out
>of a WebService result. Something where the result node values are split
>up
>and used in different places, like one node value is used as a role
>variable, another is used to set a model state variable, another is used as
>a button label, etc. I need an example of calling a WebService and
>breaking
>the result into pieces for use in multiple places, not just sticking the
>whole lastResult into the dreaded DataGrid. Any help would be appreciated
>:-)
>
>Thanks!
>Darren
>
>
>
>
>--
>Flexcoders Mailing List
>FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
>Yahoo! Groups Links
>
>
>
>
>
>
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/