Forum Academy Marketplace Showcase Pricing Features

How to show repeating group only when a button is clicked

Hello, need help!
I am creating a search feature, which will pull keywords from some database fields that I provided. I want the result to be shown only when the “Search” button is clicked.
It works for the first search, but when I clear the search/input box, and start typing something containing any keywords from the database, the Repeating Group shows before I hit the “Search” button.
Any idea how to prevent the RG to show before the button is clicked?

Your problem is that you are showing the rg group once button is pressed but you missing the part that hides the rg group.

There is a lot of ways to achive what you want.

You can change UI for example, once the button is pressed
Input becomes disabled
Button Search becomes Reset or New search
Once button Reset is pressed RG hides, input becomes empty and active. Button returns to Search state.

Another way is to use states.
Create state on element RG group that will be “your data type”, plus mark it can be a list.
Change the Search button workflow to Set state of RG group - Search for your datatype, conditional “search field” - input “search”
Change the RG group source to RG group state.

That will result in even if user will delete the input data, rg group will not update untill search button will be pressed.

Thanks @sat_miha - it works properly as expected now!