I have a textbox (TextInputFilterEvents) that I want to populate with search words:
"tra provinciale voorronde 1"
with the onchange event of the textbox, I populate a collection with these separate words:
ClearCollect(
ColSearchWords,
Split(TextInputFilterEvents.Text, " ")
);
ClearCollect(
ColFilteredClubInfo,
ForAll(
ColSearchWords As SEARCHWORD,
Filter(
VarEvents,
SEARCHWORD.Value in title
)
))
Then I have a gallery (VarEvents) that contains the field title, and I want to filter that gallery on the filter that contains all the keywords from the textbox. The words can be in a random order in the "title" field.
Filter(
VarEvents,
Sum(
ForAll(
Filter(Split(TextInputFilterEvents.Text, " "), Len(Trim(Result)) > 0),
If(Result in title, 1, 0)),
Value) > 0);
This code does not work, it returns results that contain only 1 of the words, I want all words to be in the title field.
Any suggestions?