Advanced Search Techniques

search types. Advanced search techniques allow you to create powerful, precise search experiences that help users find exactly what they need, whether they're searching connected data, filtering by location, or applying complex criteria across multiple fields.

What You'll Learn

This guide explores the advanced capabilities of Knack's search functionality beyond basic keyword searching. You'll discover how to implement complex multi-field searches, work with connected data relationships, leverage location-based searching with maps, and create sophisticated filtering options for reports. These techniques will help you build search experiences that handle complex data scenarios and provide users with powerful tools to locate specific information quickly and accurately.

Complex Multi-Criteria Searches

More complex searches are possible in Knack by combining multiple filters and keywords with more precise matching criteria. Search elements provide users with a range of advanced search options including:

  • Complex searches with multiple criteria and exact matches
  • Apply any/all logic to multiple-choice and lookup options
  • Layout options to display multiple filters in columns

Users can restrict searches to specific fields using filters and conveniently narrow down results by selecting checkboxes for multiple-choice or connected values. An added advantage is the capability to perform searches with precise matches, empowering users to efficiently locate specific information while safeguarding against accessing unnecessary data.

Exact Match Searching

When using search elements to display Orders, users can include advanced search options that exclusively retrieve a single record which precisely matches the "Tracking Number" field. This type of exact matching ensures users find the specific record they're looking for without sifting through similar but irrelevant results.

Multi-Field Targeted Searches

You can utilize advanced search options to simultaneously perform targeted searches on multiple fields. For instance, within an Employee records search element, users can search for "Marketing" in the Department field and filter the Date of Hire field to display values from the past month.

In this search, both conditions must be met for a record to be returned. As a result, this search will only display records for recently hired marketing employees within the specified timeframe.

Searching Connected Data

In addition to searching for a single set of records, users can also search for connected data. When elements display connected fields, users have the ability to filter the data based on those connected fields.

For instance, suppose you have a grid displaying records of Students that have a "Class Name" field connected to their respective Class. Your users can filter the data based on this connected "Class Name," allowing them to find students enrolled in specific classes or programs.

This capability extends to any connected relationship in your app, whether it's one-to-one, one-to-many, or many-to-many connections. Users can search and filter based on data from related tables, creating powerful cross-table search experiences.

Tip: Learn more about using connections in your app in our connections guide.

Searching Maps By Location

With Map elements, you can harness the power of geospatial searches by searching based on addresses in your records. For example, you can search by zip code or postal code to return records within a set distance, making it easy to find nearby locations, services, or contacts.

Location-based searching is particularly useful for:

  • Finding nearby service providers or locations
  • Filtering events or appointments by geographic area
  • Locating contacts or customers within specific regions
  • Analyzing geographic patterns in your data

Note: Map searches are only available on the Pro plan and above. See our pricing page for more details.

Tip: Learn more about using Map elements for location-based searching in our Map elements guide.

Advanced Search Options for Reports

Knack's report features provide users with the ability to group their records and generate reports based on those groups. As an example, users can group orders by month and generate reports on the total number of orders for each month.

The search options in reports provide users with the ability to filter which records are included in these groups. Users have control over which records are shown by using:

  • Source filters: Pre-filter data before it reaches the report
  • User queries: Filter based on the logged-in user's data
  • User-added filters: Allow users to apply their own filtering criteria
  • Predefined filter menus: Provide dropdown options for common filter scenarios

Report Search Strategies

When implementing search functionality for reports, consider these approaches:

  • Time-based filtering: Allow users to filter reports by date ranges, quarters, or fiscal periods
  • Category grouping: Enable filtering by departments, product categories, or other logical groupings
  • Performance metrics: Create filters based on key performance indicators or threshold values
  • User-specific data: Filter reports to show only data relevant to the logged-in user's role or permissions

Implementation Best Practices

Performance Considerations

When implementing advanced search techniques, keep these performance tips in mind:

  • Use data source filters to reduce the dataset before applying user searches
  • Consider pagination for large result sets
  • Limit connected field searches when dealing with very large datasets
  • Index frequently searched fields for better performance

User Experience Guidelines

Design your advanced search interfaces with these principles:

  • Progressive disclosure: Start with basic search options and allow users to access advanced features as needed
  • Clear labeling: Use descriptive labels that help users understand what each filter accomplishes
  • Logical grouping: Organize related search options together for intuitive navigation
  • Helpful defaults: Pre-populate common search criteria to speed up user workflows

Search Result Optimization

Make your search results more useful by:

  • Highlighting search terms in results when possible
  • Providing clear sorting options for result sets
  • Including relevant connected data in result displays
  • Offering export options for filtered datasets

Troubleshooting Advanced Searches

Common Issues and Solutions

Slow search performance: If searches are taking too long, consider adding data source filters to reduce the initial dataset size, or break large tables into smaller, more focused tables.

Inconsistent results with connected data: When searching connected fields with large datasets (over 10,000 records), results may be inconsistent. Use data source filters to stay within performance limits.

Complex filter logic not working as expected: Review your filter logic carefully - remember that multiple filters typically use "AND" logic unless specifically configured otherwise.

Users not finding expected results: Ensure search instructions are clear and consider providing examples of effective search terms or filter combinations.

Note: For optimal performance with advanced searches, regularly review your data structure and consider implementing data archiving strategies for historical records that don't need to be actively searched.



Did this page help you?