Jam.py documentation

Filters

For each item that have access to a database table a list of filter objects can be created.

To create filters use an Filters Dialog of the Application builder.

Filters provide a convenient way for users to visually specify parameters of the request made by the application to the project database

Each filter has the following attributes:

  • owner – an item that owners this filter,

  • filter_name — the name of the filter that can be used in programming code

  • filter_caption - the name of the filter used in the visual representation in the client application,

  • filter_type — type of the filter, see Filtering records,

  • visible — if the value of this attribute is true, a visual representation of this filter will be created by the create_filter_inputs method, when a filters option is not specified,

  • value — a value of the filter,

All filters of the item are attributes of the filters of its object. By using filter_name we can get access to the filter object:

invoices.filters.invoicedate1.value = new Date()

Another way to get access to the filter is to use filter_by_name method:

invoices.filter_by_name('invoicedate').value = new Date()