refresh data source in Autocomplete

I am using the Autosomplete example I got from here: for Flex 3.  when the application launches it grabs the data for the autocomplete from a SQL database and builds an array collection>  this same data is used on 2 different screens.  The issue I am having is that if you launch the app and go to screen 1 and type some letters in the AC control (say you type C for example) then select a value from the list of possible matches.  Then you go to screen 2, the data only contains values that match what was typed in screen 1.  How do I tell it once I leave one of the screens that the data has to be refreshed?
Who is Participating?
wannabetechieConnect With a Mentor Commented:
By same instance i mean are you using the same object of AC control on both of the screens.
And you can reset the filterFunction by doing something like this

myAC.filterFunction = null or if null is not allowed create a dummy filterFunction and assign it.

myAC.filterFunction = dummy

private function dummy(item:Object):Object
   return item;
Are you using same instance of the AC control in both the screens?If so is this a requirement for you.
And when the AC filterFunction is invoked does it do a filter on the Datasource itself.
If you then you may need to reset the filterFunction everytime.

PsychoDazeyAuthor Commented:
What do you mean by using the same instance?  I believe I am but I am a novice flex programmer so I'm not sure what you mean.  Als, how would I reset the filterFunction?
PsychoDazeyAuthor Commented:
Thanks wanna -
Your solution of the dummy filterFunction worked.  However for those following along; there were other issues so I ended up finding another component to use.  The autocomplete from my link above is older and not as robust as some of the others available.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.