I can think of working out from the datagrid dataprovider.
For ex: if the dataprovider is ArrayCollection, you could probably sort it and get the max value.
I am using this adobe tutorial here:
Specifically, I am getting xml from this php:
//return a list of all the users
$Query = "SELECT * from users";
$Result = mysql_query( $Query );
$Return = "<users>";
while ( $User = mysql_fetch_object( $Result ) )
$Return .= "<user><userid>".$User->userid."</userid>
$Return .= "</users>";
mysql_free_result( $Result );
This is based on an "all" query of the table. To get a max query I have to do things differently. Therefore, I was hoping to be able to do it within Flex.
Can you suggest a specific way of how to get one xml variable from php and into a text box?
1 person found this helpful
While you are iterating the resultSet, you could use logic to find out the Max userId.
Define a variable maxUserId and if the current UserId is greater than maxUserId, then assign the current UserId to maxUserId, by the end of loop the maxUserId will hold the max value.
Also define a xml tag <maxId>maxUserId</maxId> and you could use this tag in the text field.