0 Replies Latest reply on Oct 17, 2007 5:31 PM by jfizer

    Remove duplicates from Adobe AutoCompete text edit?

    jfizer
      Using FilterFunction I should be able to remove duplicates from the Adobe AutoComplete text edit object. However I'm having a hard time with the regular expression for this and was wondering if its something thats already been done.

      <mx:Script><![CDATA[
      private function myFilterFunction(item:*, text:String):Boolean
      {
      var regExp:RegExp = new RegExp(text," /(.+)((\r?\n|\r)\1)+\b/ig");
      return regExp.test(item);
      }
      ]]></mx:Script>

      <ns1:AutoComplete x="106" y="592" width="238" dataProvider="{dataArr}" filterFunction="myFilterFunction" labelField="ColName" id="myAutoCompete" enabled="true"/>