I've got a combo box that's presently getting its information from the database this appears to become working fine.

Now I must have content from two fields exhibiting within the combo box at the same time. Say Name &lifier Surname

I have added the data towards the query fine however the data displayed within the combo box appears to become controlled through the labelField property also it appears to simply allow one variable at any given time. Therefore it will either display Name or Surname although not both at the same time.

Does anybody understand how to do that?


here's little bit of my code

        private function NameData():void { //NAME DATA
        var stmt:SQLStatement = new SQLStatement();
        stmt.sqlConnection = sqlConn;
        stmt.text = "SELECT person_fname,person_lname FROM tbl_person ORDER BY person_fname ASC";
        var result:SQLResult = stmt.getResult();
        acName = new ArrayCollection(result.data);


    <mx:ComboBox id="picknameInput" x="120" y="202" width="170" labelField="person_fname" dataProvider="{acName}" prompt="- Select Name -"></mx:ComboBox>

You are likely to desire to use the lableFunction property and also have it return the 2 fields tied together. Here's and Example that should get you started.