# Dataset Filtering Issues

**URL:** <https://forum.kirupa.com/t/dataset-filtering-issues/82600>\
**Category:** flash\
**Created:** [March 11, 2005, 3:30pm UTC](https://forum.kirupa.com/t/dataset-filtering-issues/82600 "2005-03-11T15:30:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RysChwith](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@RysChwith](https://forum.kirupa.com/u/RysChwith)\
**Post date:** [March 11, 2005, 3:30pm UTC](https://forum.kirupa.com/t/dataset-filtering-issues/82600/1 "2005-03-11T15:30:00Z")

</div>

I’m trying to convince a dataset to sort, and having many problems. I’m using hte following function:

```auto
function selectCoverage( option:String ):Void { 
   //xmlDataSet.filtered = false; 
   if( dataFilter == option ) { 
      dataFilter = ""; 
   } else { 
      xmlDataSet.filtered = true; 
      xmlDataSet.filterFunc = function( item:Object ) { 
         trace( item.coverage.attributes.type == option ); 
         return( item.coverage.attributes.type == option ); 
      } 
      dataFilter = option; 
   } 
   ListBox.removeAll(); 
   //xmlDataSet.refreshDestinations(); 
   ListBox.refreshFomSources(); 
   ListBox.sortItemsBy( "label", "ASC" ); 
}

```

I know it’s returning the proper boolean values, but the list the receives the results isn’t changing at all. If I uncomment the “xmlDataSet.filtered = false” line, it doesn’t filter, but toggles the alphabetical sorting on and off. Anyone have any thoughts?

Rys
