Search Filter for List of Cards


New to using AppGyver.

I am fetching data from Firestore (approximately 100 records) and show the data as cards. I want to include a search bar / filter bar at the top so that the user can input a text and search for the information.

How can I make this happen?

You can handle this on the Client Side by adding a Search Bar component, and Bind a Page Variable to it’s input. Let’s call this Page Variable “SearchText”.

Then let’s assume you want to search for text in a repeated field called “Data”, or whatever the property of text you want to search is named.

In your Repeated Container ‘Visible’ Property, use a Formula like this:
IF(!IS_EMPTY(pageVars.PAGE_SearchText),IF(CONTAINS(LOWERCASE(current.Data), LOWERCASE(pageVars.PAGE_SearchText)),true,false),true)

This will then only display the repeated Containers that contain the text string found in SearchText, that the user types in.

1 Like

That worked like a charm!! Thank you so much.

1 Like

I can’t get filtering to work with my recycler view, do you know how to solve this problem?