4 Replies Latest reply on Apr 9, 2008 9:21 AM by kdennis4

    Having trouble with cfreturn to a <mx:Text> field

      I have done a return to populate a DataGrid, but I need to populate a text field. My code is as follows in my CFC where I first check a previous query for the recordcount:

      <cfif checkThisLogin.recordcount eq 1>

      <cfquery name="userInfo" datasource="ds">
      Select firstName, department, email, role
      From userTable
      Where loginID = '#arguments.thisLogin#'

      <cfreturn userInfo.firstName>

      Now my code within the mxml template:

      private function checkUser(userLogin:String,userPassword:String):void {
      if (userLogin == ""){
      Alert.show("You must enter a Login.");
      }else if (userPassword == ""){
      Alert.show("You must enter a Password.");

      private function resultHandlerCheckUser(event:ResultEvent):void{
      creativeViewStack.selectedChild = newProjects;

      <mx:method name="verifyLogin" result="resultHandlerCheckUser(event)">

      <mx:Text x="1017.15" y="10" text="{creativeLogin.firstName}" fontWeight="bold" fontSize="14"/>

      I have tried multiple ways to get the "firstName" to display, but no luck... Any suggestions would be appreciated!