Add filters and parameters in data view

Add filters and parameters in data view

Summary

Data views allow you to add fixed or dynamic filters, these are parameters.



Fixed filters

To add a filter you must click on the option Filter data.

A form would be displayed where you should select the column on which the filter, the type of operation, the operator Fixed value and the value for which the filter would be applied.

This filter is fixed, i.e. it would always apply to the response or content of the data source and could not be modified in APIs methods.






Parameters

To add a similar type filter you must click on the option Filter data.

A form would be displayed where you should select the column on which the filter, the type of operation, the operator Parametera default value and other validation configurations.

Similar-type filters would be available as parameters of the API method and could be related to context variables.




The available fields are detailed below:
  1. Name: It is the name of the parameter, it may be equal to or different from the column. The name defined here is the name to be assumed by the API method.
  2. Description: this is the description of the parameter. This text would be displayed in the API documentation on the developer portal to provide more information to developers using the API method.
  3. Value: A default must be defined over the application of the filter.
  4. Type of data: different types of data and validation rules can be defined.
  5. It is mandatory: it can be defined whether or not the parameter is mandatory (it should be sent in the application to the API method) or not. If it is not mandatory and is not sent in the application, the defined default value.


Validations

You can add validations to the parameters you would apply in the application to the API method.

The validations available are:
  1. Text
  2. Number
  3. Date

Text

If you select Text you can optionally define:
  1. A list of different values: you can enter up to 100 different values separated per comma. They are distinguished between capital and lower cells.
  2. Maximum number of characters

Number

If you select Nomero you can optionally define a maximum and minimum value.


Date

You can add validations of date formats, from the following variables:
%Y = 4 days
%y = 1 year in 2 days
%m = Number of the Month
%B = Full name of the Month
%b = Name of abbreviated month
%d = Days
%H = Hours
%M = Minutes
%S = Seconds
%f = Microseconds
Two points, middle dash or space can be used between them.

For example: '%Y-%m-%d %H:%M:%S:%f' equals '2006-10-25 14:30:59.00200'

Relationship between parameters


Once the settings have been defined, you could know them in the summary and apply the AND and OR operators between the parameters.



You can apply more than one filter to data view by combining fixed filters and parameters. It can also indicate whether the condition between multiple filters is OR or AND.

Filter operations

The operations available when applying fixed and similar filters are:
  1. Equal to
  2. Not equal to
  3. Bigger than
  4. Bigger or just like
  5. Smaller than
  6. Smaller or equal to
  7. Contains some
  8. Contains everything
  9. It does not contain everything