Greg,

You could try binding them like this:

<mx:Text id="text1" text="{myWS.getData.lastResult(0).total}"/>
<mx:Text id="text2" text="{myWS.getData.lastResult(1).total}"/>

-TH

--- In [email protected], "Greg Morphis" <[EMAIL PROTECTED]>
wrote:
>
> maybe I didnt make myself clear.. and I apologize for the typos
heh..
>
> anyways my CFC function returns the total, the record set looks
like this:
> type_id      total
> 1               3000
> 2               5000
>
>
> I just want to set the textA equal to the type_id(1)'s value and
textB
> equal to type_id(2)'s value.
>
> This possible or should I just make to functions, one to grab the
> total where type_id equals 1 and one where type_id equals 2?
>
>
> Thanks much!
>
>
> On 5/18/06, Darren Houle <[EMAIL PROTECTED]> wrote:
> > If there is a myWS.getData.lastResult.recordCount I have yet to
find it, but
> > even if there was you wouldn't get totals for your two types,
you'd just get
> > the total number of all rows.  I think once the web service
operation
> > completes you'd need to result= to a function that enumerated
through the
> > records and counted the two types.  Make those two type counter
variables
> > bindable and bind your text fields to them.  Init them to 0 so
the text
> > fields show 0 until the ws operation completes.
> >
> > Darren
> >
> >
> > >From: "Greg Morphis" <[EMAIL PROTECTED]>
> > >Reply-To: [email protected]
> > >To: [email protected]
> > >Subject: [flexcoders] returning values from a webservice
> > >Date: Thu, 18 May 2006 12:15:58 -0500
> > >
> > >so I have a function in a CFC that returns to rows, a type_id
and a
> > >total. I have 2 text boxes that I want to populate with those
values.
> > >Something like:
> > >textA = the total where the type_id = 1;
> > >textB = the total where the type_id = 2;
> > >
> > >But how do I assign these values? I assume it's done in the
return
> > >function..
> > >public function handleTotals (event:ResultEvent):void {
> > >     textA = event.result??
> > >     textB = event.result??
> > >
> > >}
> > >
> > >I have the text boxes declared and have them bindable.
> > >So can do I do this or do I need to make 2 functions each
function
> > >return 1 type of total? (add "where type_id = 1" and "where
type_id =
> > >2" to the queries)??
> > >
> > >Thanks so much for the help!
> > >
> > >
> > >
> > >--
> > >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
> >
> >
> >
> >
> >
> >
> >
> >
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to