Get Collection from REST API

I am using Food Data Central API for my app. I am using the GET COLLECTION method to get the list of foods.

Getting the status as ok
Screen Shot 2022-04-01 at 5.32.32 PM
What should I bind for the search button?
I have created a data variable, as a collection of records. But I am not able to bind it to the search button, as it is showing incompatible.
It seems I am making some mistake, can someone please help me out with this?

Search bar’s value can be a “text” variable. That will be the text according to what You will need to filter Your data or even to get the record collection.

Now 2 important things to remember. It is not advised to use a logic like:
Search bar’s value changed → get record collection. This would cause many request after each other, and would most probably fail to load data.
The other thing is that typos, lower and uppercase writing is also a thing to check for search.

You could do something like:

  • search bar
  • button (“Search”)

Thus the user has to type in the search and click on button. After the button click You can trigger the “Get record collection” flow with a filter condition and use the searchbar’s value. For this of course You need to have a pageVars for example “searchText”.
Also in the filter condition try to using “Lowercase” formula to avoid differences.
So first create the filter formula as an object with two properties binding.

Though I am not sure that you can use lowercase on the property in the api request. :confused:

In this, there is no option for a filter condition

Can anyone please help me out with this?

Sorry for late reply. In this case I think that You need to create a filtered query in the data configuration screen. But I cannot provide more details on that, as I am still learning about REST APIs.

Did you find any documentation related to this? especially how to use the get collection method. Share it if you find anything handy. It would be helpful for me. Thanks

You can check this video on YouTube, it helped me a lot for my REST API with, it may help you and give you more ideas, including filters (Uppercase, Lowercase, etc): No-code Power-up: Search bar with autocomplete suggestions /w AppGyver - YouTube