As the user types into a text control, I want to display FAQ questions in a gallery below the input based on words entered.
Here is where I'm at:
TextControl.OnChange:
Set(varQString, Self.Text);
ClearCollect(colQOWords, Split(varQString, " "));
ForAll(colQOWords, If(Len(ThisRecord.Value) > 4, Collect(colFWords, ThisRecord)));
That takes the contents of the control, splits it into a Collection at each space and then I look through that collection and build a second containing only the strings >4 characters.
This is what i was originally using on the Gallery.Items property:
If(
!(
txtFrmQuestion
.Text),
Filter(
'colFAQ',
string1 in Text(Question) || string2 in Text(Answer)
)
)
I just can't figure out how to put a variable quantity of strings into the Filter to search in the Question and Answer column.