I have a map services with many fields. There are logical names to the fields like "Pasture_2002_Acres", Pasture_2007_Acres", "Crops_2002_Acres", "Crops_2007_Acres"I created an array of fields that I'd like to have show up in a datagrid. Based on whether the user wants to see Pasture information vs Crop information, the fields you'd want to see would be different.I've run a querytask that generates a graphics layer and it contains all the attributes. If the user wants to see just Pasture information, I made an array of just the fields related to that. These become the fieldnames for a newly creaed datagrid. The year is set from a radio button. The results is an ArrayCollection I populated during the OnResults function of the querytask and it does have the right data in it. var fieldNameArray:Array = ["COUNTY","SQMILES",year+"_PASTURE_ACRES",year+"_PASTURE_SQMILES_TREATED",year+"_ PCTAREA_PASTURE"]; var selectDGcolumns:Array = []; for each (var fieldName:String in fieldNameArray) { var dgColumn:DataGridColumn = new DataGridColumn; dgColumn.dataField = fieldName; trace (dgColumn.dataField); dgColumn.setStyle("textAlign","right"); selectDGcolumns.push(dgColumn); } dg.columns = selectDGcolumns; dg.dataProvider = results;This works just great the first time around. I have an "Open Table" button that opens a titleWindow that displays the datagrid. The grid populates with the fields and values I expect. The problem comes in when I want to change to a different subject.The field array traces just fine (shows the change in the year).But when I go back through the 'for each' loop, the columns in the datagrid continue to be the ones I had chosen from the first time I used the tool. I think I have emptied the array out by maybe I'm not understanding how to empty out all my arrays etc properly.