ADVANCED REPEATER FILTERING - "Space" breaks search between dataset columns


I feel like this must have been answered before, but I’ve been looking for hours and can’t figure it out.

When i type what needs to be filtered by the repeater, it usually goes accross data columns, but when i type a space " ", the filter returns nothing, ie, it breaks.

in the attached example If you type "the aeneid " nothing appears.
How do you get the search to ignore the space?
can you help fix this?

My file is kinda complicated now, but I have uploaded the generic tutorial because it has the same problem I am encountering, and most of my code has come from here.

RepeaterIgnoreSpace.rp (2.6 MB)


Add the trim() function to the end of the expression that retrieves the text from the field. This will also make it ignore leading whitespace.

[[Item.Author.toLowerCase().indexOf(This.text.toLowerCase().trim()) >= 0 || Item.Title.toLowerCase().indexOf(This.text.toLowerCase().trim()) >= 0]]

Here are details on the trim() function.

What if you removed ALL spaces from both the search term and the repeater rows? Something like this?

RepeaterIgnoreSpace.rp (2.6 MB)

1 Like