52
Views
7
Comments
Solved
Add in search function to search rest api data displayed in records table.
Question

How do i add in a search function to search for rest api data that is displayed in records table? The data is obtained from a rest api. I want to search for countries and when i type in a certain country, the row for that country will appear. MY URL is: https://loo-chujun.outsystemscloud.com/cc/Entry1.aspx?_ts=637263114272934586 
Below is a screenshot of the preparation. How do i add in and configure the filter in the preparation so that I can filter and search for the countries? Attached is the oml for my web app.


cc.oml

mvp_badge
MVP
Rank: #91
Solution

Hi Loo Chu Jun,

I create a sample app based on the mentioned use case...

Check this:

COVID19_Survey_Report

COVID19_Survey_Report_By_CountryName


See the attached .oml solution file

Hope this helps you!


Regards,

Benjith Sam

CovidSurveyDemoApp.oml

Hi,

Do you already try to use the listFilter from system module? With that you can filter your result by the parameters that you want. 


Best regards, 

Ricardo Pereira

mvp_badge
MVP
Rank: #91
Solution

Hi Loo Chu Jun,

I create a sample app based on the mentioned use case...

Check this:

COVID19_Survey_Report

COVID19_Survey_Report_By_CountryName


See the attached .oml solution file

Hope this helps you!


Regards,

Benjith Sam

CovidSurveyDemoApp.oml

mvp_badge
MVP
Rank: #69

Hello Loo.

I made the adjustment Ricard suggested.

Now the table is fed by a variable of type list. Your Search Action filters the Web Service results to that list by SearchKeyword.

I also changed the button to Ajax Submit.


cc.oml