Convertigo Public Knowledge base

How to filter out data from a SQL query, XML/JSON file or API call?

How to filter out data using a Select component in your Convertigo application?

Best practice recommends to use the same sequence with a “filter” variable.

If the filter is empty it returns all the data.

When the filter as a value, you can:

  • Use the filter in your SQL query/external file/API call

or

  • Filter the global response with sequences Steps.

In your Select Component add an IonChange event and call your main sequence with the filter variable set to option value of the Select.

As it is the same sequence name that you call (but with a filter variable filled), it will be displayed automatically with the filtered data.

The ionChange event has to be set under the SelectContainer component.

The values are set in the different Value property of the SelectOption components.

 

To get the value selected in the Select component, use the Actions Sources in the Source Picker (Convertigo 8.2.0+):

Convertigo 8.2.0 sample project, with a Select and a SearchBar to filter data from an XML file:

https://github.com/convertigo/c8oprj-sample-filter

(c) Convertigo 2023 https://www.convertigo.com