The application generator automatically configures all data controller fields for adaptive filtering. Only “blob” fields such as pictures and long text fields are excluded. Fields created manually will have filtering disabled. The Allow Query-by-Example property controls if adaptive filtering is allowed for a field.
Query-by-Example can be disabled to prevent filtering on a field.
Start the Project Designer. In the Project Explorer, double-click on Products / Fields / ProductName node.
Disable Allow Query-by-Example.
Property | New Value |
Allow Query-by-Example | false |
Press OK to save the field. On the toolbar, press Browse.
Navigate to the Products page. Click on the Product Name header. No filtering options will be available.
The Product Name field will not be available for search in the advanced search bar.
Large text fields do not have filtering enabled because most search operations would not work, such as auto-complete, sampling, and multiple values. For Microsoft SQL Server, the only available search options are “contains” and “does not contain”.
Let’s enable filtering for the Description field in the Categories controller.
In the Project Explorer, double-click on Categories / Fields / Description node.
Enable Query-by-Example.
Property | New Value |
Allow Query-by-Example | true |
Press OK to save the field.
In the Project Explorer, double-click on Categories / Views / grid1 / Description data field node.
Change the Search Options property.
Property | New Value |
Search Options | $disablesamples, $disablemultiplevalues, $disableautocomplete, $contains, $doesnotcontain |
Press OK to save the data field. On the toolbar, press Browse.
Navigate to the Categories page. Activate the dropdown in the Description column header. Two text filters are now available – contains and does not contain.
The filters will also be available on the advanced search bar.