0 Replies Latest reply on Oct 20, 2006 9:56 AM by Like2Flex

    Output sum in query to FLex textbox

    Like2Flex Level 1
      Hello,

      i want to output a number (can be a float) in a textbox in flex.
      See my query form my CFC and my flex code.

      I can't output it as numeric in the textbox.

      Pls help me out with some codes.

      Thx

      <cfcomponent>
      <cffunction name="getFigures" access="remote" returntype="query">
      <cfquery name="qgetFigz" datasource="test" >
      Select
      sum(tbl_ords.no_deans) as noofdeans
      sum(tbl_ords.no_tent) as nooftents
      from tbl_ords
      where 1=1

      </cfquery>
      <cfreturn qgetFigz>
      </cffunction>
      </cfcomponent>

      [Bindable]
      public var figures:ArrayCollection= new ArrayCollection();

      public function getFigures(event:ResultEvent):void
      {
      figures=event.result as ArrayCollection;
      txt_deans.data=figures;
      txt_deans.text=new String(parseFloat(noofdeans));
      }