How to know the items located on filter FNCTableView?

Hello

I used the next lines in order to manually filter my FNCTableView

var f: TTMSFNCTableViewFilterData; begin f := TMSFNCTableView1.Filter.Add; f.Condition := 'B*'; TMSFNCTableView1.ApplyFilter; end;

How can I obtain the number of items located with such occurrences? I mean how many FNCTableView Items was located... not ocurrence in one FNCTableView item

Also it's possible to search different words like "hola 123 japon" in one condition?

Thanks

Right now, it's not possible to retrieve the number of items. We have made the following changes so this can be retrieved.

function MatchFilter(AItem: TTMSFNCTableViewItem): Boolean

which can be used to check if the filter applied matches the items in the collection, you'll need to loop through the items and use this function. Next version will have this exposed.

It's possible to search more words in one condition:

fd.Condition := '"hola" | "123" | "japon"';

Great news!!!

I can't wait to download latest version

Hello again

Just to let you know that the next lines give me an aproximately of the items, except that includes "categories headers"

FNCTableView.TreeView.Groups.TreeView.GetTotalNodeCount

How to not count the categories headers inside those GetTotalNodeCount?

Hi,

We've applied some more changes. We are building new updates, next version will include DisplayItemCount and a way to count the items distinct between normal item & category item.

procedure TForm1.Button1Click(Sender: TObject);
var
  I: Integer;
  di: TTMSFNCTableViewDisplayItem;
  iCount, cCount: Integer;
begin
  iCount := 0;
  cCount := 0;
  for I := 0 to TMSFNCTableView1.DisplayItemCount - 1 do
  begin
    di := TMSFNCTableView1.DisplayItem[I];
    case di.Kind of
      tvikItem: Inc(iCount);
      tvikCategory: Inc(cCount);
    end;
  end;

  TTMSFNCUtils.Log('Item Count: ' + iCount.ToString);
  TTMSFNCUtils.Log('Category Count: ' + cCount.ToString);
end;

In the display item record are properties:

  TTMSFNCTableViewDisplayItem = record
    Kind: TTMSFNCTableViewDisplayItemKind;
    Item: TTMSFNCTableViewItem;
    CategoryID: Integer;
    Row: Integer;
    Text: string;
  end;

Hello

Today I downloaded the latest version and works like a charm.

HOWEVER there is another bad behavior and I recorded a video in order to demostrate you this at the next link: https://timbralofacil.com/descargas/lookupbar.mp4

As you can see my users now can filter records on FNCTableView and see how many results items are involved, BUT the lookupbar must reflect those change because always maintain active the characters of the entire FNCTableView items and not the filtered ones right?

You can see the pink jump rectangle on the video that stays with the same results always and the correct is to update only the filtered records.

We've added a new option: LookupBar.IncludeFilteredItems (default true).

Set it to false when the next version comes out and it will ignore items that are not visible or filtered.

Concerning to this comment, I can't make it work searching more than one word as you put in your sample separate with pipes, I've 6.3.1.0 downloaded version.

It means sentence below it does not work

It's possible to search more words in one condition:

fd.Condition := '"hola" | "123" | "japon"';

Please provide a sample then, because this works with a default TTMSFNCTableView on the form:

  TMSFNCTableView1.Filter.Add.Condition := '"Bugfix 376" | "Bugfix 378" | "Release Planning"';
  TMSFNCTableView1.ApplyFilter;

image

On your sample, you are expecting the user "enter ALL the words", but the idea is the user write a few caracters not entire word or phrases.

Remmember on mobile devices the less caracters the user type better.

What do I need to put in order to find the same results with partial characters?

TMSFNCTableView1.Filter.Add.Condition := '"Bug" | "Rele nning"';
TMSFNCTableView1.ApplyFilter;

Remove the double quotes.

Double quotes is to search for the exact string.

  TMSFNCTableView1.Filter.Add.Condition := '*Bug* | Rele*';
  TMSFNCTableView1.ApplyFilter;