WorkWithPlus offers Column Filters for the different types of data, and automates their generation when working in a grid with Base Tables, based on the default configuration for the data type.
In WorkWithPlus Settings, we have the default configuration of the column filters by data type (Grid Title Filter):
It is possible to customize the definition of the column filters from the property in the attribute or variable of the grid:
- The default variable of the filter will have the following nomenclature "&TF<ATT_NAME>", for example for CountryName: &TFCountryName.
- When the search box of the column filter is defined as type Range, a variable with the following nomenclature "&TF<ATT_NAME>_To" is added, for example CountryId: &TFCountryId_To.
- When adding Data List, Dynamic or fixed values, the variable with the name "&TF<ATT_NAME>_Sel" is used, for example: CountryName: &TFCountryName_Sel
It is very important to know that there are filters that WorkWithPlus can automate and others cannot, since they depend on the logic that the developer is implementing. In addition to what WorkWithPlus can generate automatically, we must pay attention to whether the title filter is one of those predefined in settings or is a custom filter, for which we must configure its condition and characteristics. For the latter, it is very important to know the nomenclature of the title filter variables.
Here's an example like WorkWithPlus automatically uses these variables.
Another scenario where it is necessary to know the variables mentioned above is when the grid is loaded by variables, in these cases WorkWithPlus does not automate the searches, and it is necessary to manually define the desired logic for each data type and filter type.
For example, a Range type filter without Data List, you only have to add the condition in the grid:
In the case of a list with fixed values, it is the same, it is necessary to add the condition in the Grid.Load
If the list is dynamic, a procedure will be generated with the name "<PANEL_NAME>GetFilterData",
In this procedure, you have to load the variables in the same way as in Grid.Load:
The last case is when working with SDT, where depending on how we load its data, we must handle the corresponding conditions. We have to define the title filters for each column and the LoadSDT sub, add our sdt load including the conditions that contain the where using the variables. In this case the nomenclature of the variables is very similar, including the SDT name:
You must also add the payload from the GetFilterData procedure:
In the case of SDT, we attach this example of the previous image.