anchor.diff:    inherited Destroy;
   end;
   
  -function TmFilter.GetFormattedValue: Variant;
  +function TmFilter.Evaluate(aActualValue: Variant): boolean;
  +var
  +  rl : TVariantRelationship;
  +  str, strF : string;
  +  i : integer;
  +begin
  +  case Self.FilterOperator of
  +    foUnknown:
  +      Result := false;
  +    foEq:
  +      Result := (VarCompareValue(aActualValue, FValue) = vrEqual);
  +    foNotEq:
  +      Result := (VarCompareValue(aActualValue, FValue) = vrNotEqual);
  +    foGtOrEq:
  +      begin
  +        rl := VarCompareValue(aActualValue, FValue);
  +        Result := (rl = vrEqual) or (rl = vrGreaterThan);
  +      end;
  +    foLtOrEq:
  +      begin
  +        rl := VarCompareValue(aActualValue, FValue);
  +        Result := (rl = vrEqual) or (rl = vrLessThan);
  +      end;
  +    foLike:
  +      begin
  +        if not VarIsNull(FValue) then
  +        begin
  +          str := lowercase(VarToStr(FValue));
  +          strF := lowercase(VarToStr(aActualValue));
  +          Result := (Pos(strF, str) > 0);
  +        end
  +        else
  +          Result := false;
  +      end;
  +    foStartWith:
  +      begin
  +        if not VarIsNull(FValue) then
  +        begin
  +          str := lowercase(VarToStr(FValue));
  +          strF := lowercase(VarToStr(aActualValue));
  +          Result := (Pos(strF, str) = 1);
  +        end
  +        else
  +          Result := false;
  +      end;
  +    foEndWith:
  +      begin
  +        if not VarIsNull(FValue) then
  +        begin
  +          str := lowercase(VarToStr(FValue));
  +          strF := lowercase(VarToStr(aActualValue));
  +          Result := ((Pos(strF, str) - 1 + Length(strF)) = Length(str));
  +        end
  +        else
  +          Result := false;
  +      end;
  +    foIn:
  +      begin
  +        if not Assigned(FValuesAsStrings) then
  +        begin
  +          FValuesAsStrings := TStringList.Create;
  +          FValuesDictionary := TmStringDictionary.Create();
  +
  +          ConvertVariantToStringList(aActualValue, FValuesAsStrings);
  +          for i := 0 to FValuesAsStrings.Count - 1 do
  +          begin
  +            str := lowercase(FValuesAsStrings.Strings[i]);
  +            if FValuesDictionary.Find(str) = nil then
  +              FValuesDictionary.Add(str, FValuesAsStrings); // FValuesAsString is just a placeholder, to be able to check return value of find as nil
  +          end;
  +        end;
  +        Result := FValuesDictionary.Find(lowercase(VarToStr(FValue))) <> nil;
  +      end;
  +  end;
  +end;
  +
  +procedure TmFilter.CopyFrom(aSource: TmFilter);
  +begin
  +  Self.FFieldName := aSource.FieldName;
  +  Self.FFilterOperator := aSource.FFilterOperator;
  +  Self.FValue := aSource.FValue;
  +end;
  +
  +function TmFilter.GetFormattedValueForSQL: Variant;
   begin
     if not VarIsNull(FValue) then
     begin
  
positive.code:     FFieldName : string;
      FFilterOperator : TmFilterOperator;
      FValue : Variant;
    public
      constructor Create;
      destructor Destroy; override;
  
      function GetFormattedValue : Variant;
  
      property FieldName : string read FFieldName write FFieldName;
      property FilterOperator : TmFilterOperator read FFilterOperator write FFilterOperator;
      property Value : Variant read FValue write FValue;
    end;
  
  
  
negative.code:   Result := FList.Items[aIndex] as TmFilter;
  end;
  
  procedure TmFilters.CopyFrom(aSource: TmFilters);
  var
    i : integer;
  begin
    Self.Clear;
    for i := 0 to aSource.Count - 1 do
      Self.Add.CopyFrom(aSource.Get(i));
  end;
  
  { TmFilter }
  
  procedure TmFilter.SetValue(AValue: Variant);
  begin
    if FValue=AValue then Exit;
    FValue:=AValue;
    FreeAndNil(FValuesAsStrings);
    FreeAndNil(FValuesDictionary);
  end;
  
  constructor TmFilter.Create;
  begin
    FFilterOperator:= foUnknown;
    FValuesAsStrings:= nil;
    FValuesDictionary:= nil;
  end;
  
  destructor TmFilter.Destroy;
  