I am using flex 3 and ColdFusion. I fill an ADG with an ArrayCollection from a RO call to my cfc. Works great. But my problem is that the query has 2 locations (North or South). So I have a combobox that has the 2 locations North or South. When one of these are selected everything is perfect but when I dont select either North or South and have the combo blank the data shows the 2 records one for the North and one for the South. I really want to sum the North and South but only when the combobox is blank. Whats the best way to do this? I am thinking my CFC could fire of the first query and then have a query of query; Im not sure how to get the 2 result sets. Then switch the dataprovider when the combobox is changed. If I could figure out how to get the 2 result sets from my RO call I think Id be all set.
You can fire just one query which returns both the results. Get them as XML and then filter the result with e4x based on what the selection of the combo box is and assign that as the datatprovider to the grid.
I like what your saying, but how do you get 2 results? I see that the RO gets the result of the one query and fires the result handler. how can it get 2? do you have a sample?
If the data is in the same DB table, then all you need to do is not pass in a conditional and get all the data back. Then you can filter it with e4x on that result.