Working with TitleFilter using Variables

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):

Column Filters Settings

 

It is possible to customize the definition of the column filters from the property in the attribute or variable of the grid:

Customize title filter

 

Title Filter Variables for conditions:

  • 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

Here's an example like WorkWithPlus automatically uses these variables:

TF Variables

 

Grid with 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.

 

Grid conditions:

For example, a Range type filter without Data List, you only have to add the condition in the grid:

RangeTF

RangeLoad

In the case of a list with fixed values, it is the same, it is necessary to add the condition in the Grid.Load

 

GetFilterData Conditions:

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:

SelTF

SelGFT

Working with SDT:

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:

LoadSDT

You must also add the payload from the GetFilterData procedure:

GetFilterSDT

 

In the case of SDT, we attach this example of the previous image.