Your data is only as valuable as the meaning you can get out of it. Search and queries are powerful tools that can help uncover that meaning by revealing the precise information you need at the right moment.
Search features in Knack can be used for:
- Basic searches with keyword search, filters, and sorting
- Advances searches with multiple criteria, exact matches, and any/all logic
- Searching connected data
- Searching locations on a map
In this example app, you can see advanced search options available in a search view showing Contact records.
Here are a few different searches you can try out in that example app to see how search works in Knack:
- Search for where the Title contains "Sales"
- Search for the keyword "Director" and where Status is “Lead”
- Search for where "Address" is near (a zip code) “93102”
- Search for where "Date of Initial Contact" is before “04/09/2017”
This article shows examples of the types of search options that are available in Knack.
Search In The Builder
For quick, one-time searches you can search directly in your Knack Builder. There you can quickly dig into your data with keyword searches and filters. Searching in the Builder is great for checking your data while building or managing your application.
You can find these quick search options by accessing your object records in the Builder. For example, in this Warehouse Manager, you can quickly search for Inventory records that are not connected to a Warehouse. In the search below, you can see we have added a filter to only show records where "warehouse is blank":
Learn More
- About the Knack Builder
- Learn more about managing records in the Knack Builder
Search In Your Live Application
In the Live Application, you can add traditional search options like keyword search, filters, sorting, and pagination. You can also add more robust functionality by showing results from connected records, querying by the logged-in user, geospatial search with maps, and combining search with reports.
Basic Search Options
Basic search options can be added to views like tables, lists, calendar, and maps to give your users multiple ways to search your data. You can even predefine these search options to present data that match your exact search criteria.
Basic search options include:
- Keyword search
- User-defined filters
- Preset filter menus
- Predefined options with internal filters, sorting, and grouping
Keywords
With keyword searches, you can quickly search through your data to target a specific keyword. This is one of the most common search types which allows users to easily filter data.
In Knack, the keyword search option will search every field in a single object.
For example, if you have a table listing multiple Company records, you can search for the keyword "Coffee" to return all the Company records which contain the word “Coffee”.
Filters
User-defined filters can be enabled to allow your users to dig into your data with their own criteria.
For example, on a table showing Inventory records, users can filter by a specific Supplier.
Filter Menus
Filter menus allow your users to apply predefined filters by simply clicking a link in a menu.
For example, you can create a predefined filter menu to easily view different stages of a project pipeline. Projects will be filtered based on the filter menu items created to correspond with different project stages.
Predefined Search Criteria
With the data source options, you can control exactly how your data is presented to your users in views.
This allows you to enforce internal criteria on what data will show in those views by adding:
- Filters
- Sort settings
- Limiting how many records are displayed.
For example, in this Equipment tracker, you can create a table only showing the ten most recent borrowed or returned items records.
Sorting, Grouping, and Pagination
You can also customize how the user interacts with the queried data with tools like sorting, pagination, and grouping.
For example, in this table, you can see Donation records grouped by Campaign. You can also see pagination options and sort options have been applied.
Learn More
- About Views
- Learn more about tables, lists, search, calendar, and map views.
- Learn more about which records will display by using the Data Source options.
- Learn more about how to add groupings to a table.
Search By The Logged-in User
Searching sometimes needs to be done on a per-user basis. In these cases, you can build views only showing records connected to the logged in user.
For example, you can build a table only showing Lead records connected to that logged in Sales Rep. This will allow users to search within this set of records without accessing records of other Sales Reps.
Learn More
- Show records connected to the logged in user.
- View our Customer Portal Demo App
Advanced Searches
Knack has a search view that includes more options for advanced searches:
- 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
More complex searches are possible by combining multiple filters and keywords with more precise matching criteria. For example, you can limit the search to target specific fields with filters. You can also allow your users to select checkboxes to quickly narrow down by multiple choice or connected values.
Even more powerful is the ability to search with exact matches. This allows your users to only find what they need and in some instances protect data that they don’t need to see.
For example, in a search view showing Orders, you can add advanced search options to only return a single record that is an exact match for the "Tracking Number" field.
Advanced search options can also allow you to run specific searches on multiple fields at once. For example, in a table of Employee records, you can search the Department field for "Marketing" and the Date of Hire field for values during the last month. In this search, both criteria would need to be true to return a record. So this search would only return records for new marketing employees hired in the past six months.
Learn More
- Learn more about using search views.
- How to simulate a login with a search view
Search Connected Data
Beyond searching for a single set of records, you can also search connected data. When views display connected fields, your users can filter based on those connected fields.
For example, let's say you have a table showing Student records that include a "Class Name" field with their connected Class. Your users could filter the data based on that connected “Class Name."
Learn More
- Learn more about using connections in your app.
Search Maps By Location
With map views, 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.
Note: Map searches only available on the Pro plan and above.
Learn More
- Learn more about using map views to search.
Search Options For Reports
Knack report features enable you to group your records together and run reports on those groups. For example, you could group orders by month and then run reports on the total orders for each month.
Reports include the same search options to filter which records are included in these groups. You can control which records are shown using source filters, queries based on the logged in user, user-added filters, and predefined filter menus.
Learn More
- Learn more about using report views with Knack.