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?
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:
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;
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.
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:
Today installed latest version, I can see now the IncludeFilteredItems property working as I requested, however delay is 1 to 2 seconds more to process any filter applied to the enduser.
It will not work for me because my user now will see my App with delays, what I will do is after filtered any data I will put lookup bar invisible, and if my user clear the filter I will put visible the lookup bar again.
I think you code something bad and I will show you in the next video:
I installed latest version again, indeed the lookup bar now reflect "only" the filtered items but now it does not work anymore once filtered, so if my user wants to use the lookup bar with his fingers in order to move fast in order to locate some item starting by his initial then it would not work.
If stopfiltering then lookupbar start working again.