0 Replies Latest reply on Jan 23, 2011 10:13 AM by JohnAtNook

    What is the prefered method to access the value of a single column?

    JohnAtNook

      What is the prefered method to access the value of a single column of a single record query being returned to flex? For example, a user logs in successfully, I return the user details in a query.  I want to look at the role column of that result and based upon the value of his role redirect him to a different view.

       

       

      LOG THE USER IN:

      protected function submitLogin_btn_clickHandler(event:MouseEvent):void
                  {
                      loginUserResult.token = userService.loginUser(username and password);
                  }

       

       

      EVALUATE THE USER'S ROLE:

       

      <s:CallResponder id="loginUserResult">
                  <s:result>
                      if (HERE IS WHERE I WANT TO EVALUATE BUT NOT SURE BEST METHOD = 'Administrator') {

       

                          go to admin view

       

      } else {

       

      go somewhere else

       

      }
                  </s:result>
              </s:CallResponder>

       

      Thanks!