Hi
ClearCollect(
colTest,
{ ID: "1", Color: "black", Material: "metal", Size: "small", Type: "ball", Quantity: 40 },
{ ID: "2", Color: "yellow", Material: "plastic", Size: "big", Type: "ball", Quantity: 200 },
{ ID: "3", Color: "black", Material: "metal", Size: "medium", Type: "box", Quantity: 100 },
{ ID: "4", Color: "purple", Material: "glass", Size: "small", Type: "plate", Quantity: 100 })

I would like to make a searchbox with a multiple keywords search.
So, when I type "black metal small ball" to the searchbox -> I would like to get the ID: "1" row in the result.
When I type "black glass" to the searchbox -> I would like to get a blank result (and not the ID: "1", ID: "3", ID: "4" rows)
All words have to be AND connection.
I tried with this code, but it's not good.
ClearCollect(
colWords;
Split(
Trim(TextInput1.Text);
" "
)
);;
ClearCollect(
colResults;
Distinct(
Ungroup(
ForAll(
colWords;
Filter(
colProba;
colWords[@Result] in Color || colWords[@Result] in Material || colWords[@Result] in Size || colWords[@Result] in Type
)
);
"Value"
);
ID
)
);;
RemoveIf(
colResults;
Result = Blank()
);;
Clear(colFinal);;
ForAll(
colResults;
Collect(
colFinal;
First(
Filter(
colProba;
ID = Result
)
)
)
)