Advanced Features

Query Filters for Reference Fields

Filter which records appear in reference field dropdowns using QuickBase query syntax. Control which parent records users can select.

Important: Reference Fields Required

Query filters can only be applied to lookup proxy fields (reference fields).These are dropdown fields that allow users to select a parent record from another QuickBase table. Query filters must be created in QuickBase first as part of your reference field setup.

Overview

Query filters allow you to limit which records appear in reference field dropdowns. Instead of showing all records from the parent table, you can filter to show only records that match specific criteria. This is incredibly useful for showing only active records, records within a date range, or records matching specific conditions.

💡 Example Use Case:

Imagine you have a "Companies" table with both active and inactive companies. When users select a company in your form, you probably only want them to see active companies. By adding a query filter like{6.EX.'Active'}, only companies with Status = "Active" will appear in the dropdown.

How Query Filters Work

Query filters use QuickBase query syntax to filter records from the parent table. When a user opens the form, SyncForms queries the parent table using your filter, and only matching records appear in the dropdown.

Filter Process:

  1. 1User opens the form with a reference field (lookup proxy field)
  2. 2SyncForms queries the parent table using your query filter (if configured)
  3. 3Only records matching the filter criteria are returned
  4. 4The dropdown displays only the filtered records

Adding Query Filters

Query filters are added to lookup proxy fields in the Form Builder using the visual Query Filter Builder.

Step-by-Step:

  1. 1Open your form in the Form Builder
  2. 2Select a lookup proxy field (reference field dropdown)
  3. 3In the field settings panel, scroll to the Query Filter section
  4. 4Click Add Filter or Edit Filter
  5. 5Use the Query Filter Builder to create your filter (see below)
  6. 6Click Save Filter to apply it to your field

Using the Query Filter Builder

The Query Filter Builder provides a visual interface for creating QuickBase query filters. You can build complex filters with multiple conditions using AND/OR logic.

Match Type:

Choose how multiple filter conditions should be combined:

  • All conditions (AND): Record must match ALL conditions to appear in the dropdown. Use this when you want to narrow down results.
  • Any condition (OR): Record can match ANY condition to appear. Use this when you want to show records matching multiple possible values.

Building Filters:

  • Click Add Filter to create a new filter condition
  • Select a Field from the parent table dropdown
  • Choose an Operator (operators are filtered based on field type)
  • Enter a Value (or leave empty for "Is empty"/"Is not empty" operators)
  • Add more filters as needed - they'll be combined using your selected match type
  • Review the Query Preview to see the generated QuickBase query

QuickBase Operators

The Query Filter Builder automatically shows only operators that are valid for the selected field type. Here are the available operators:

Text Field Operators:

  • Equals (EX): Exact match
  • Does not equal (XEX): Not equal
  • Contains (CT): Field contains the value
  • Does not contain (XCT): Field does not contain the value
  • Starts with (SW): Field begins with the value
  • Does not start with (XSW): Field does not begin with the value
  • Is empty / Is not empty: Check if field has a value

Numeric Field Operators:

  • Greater than (GT): Value is greater than
  • Greater than or equal (GTE): Value is greater than or equal to
  • Less than (LT): Value is less than
  • Less than or equal (LTE): Value is less than or equal to

Date Field Operators:

  • Before (BF): Date is before the value
  • On or before (OBF): Date is on or before the value
  • After (AF): Date is after the value
  • On or after (OAF): Date is on or after the value
  • Greater than / Less than: Also available for date comparisons

Query Filter Examples

Here are common query filter examples and how they work:

Example 1: Show Only Active Records

{6.EX.'Active'}

Match Type: All (AND)

Filter: Status (Field 6) | Equals | Active

Shows only records where the Status field equals "Active". Perfect for filtering out inactive, archived, or deleted records.

Example 2: Multiple Conditions (AND)

{6.EX.'Open'}AND{10.GT.10000}

Filters:

  • • Status (Field 6) | Equals | Open
  • • Value (Field 10) | Greater than | 10000

Shows only records that are both "Open" AND have a value greater than 10,000. Both conditions must be true.

Example 3: Multiple Statuses (OR)

{6.EX.'Active'}OR{6.EX.'Pending'}

Match Type: Any (OR)

  • • Status (Field 6) | Equals | Active
  • • Status (Field 6) | Equals | Pending

Shows records where Status is either "Active" OR "Pending". Either condition can be true.

Example 4: Date Range

{8.AF.'2024-01-01'}AND{8.BF.'2024-12-31'}
  • • Created Date (Field 8) | After | 2024-01-01
  • • Created Date (Field 8) | Before | 2024-12-31

Shows only records created in 2024. The date must be after January 1, 2024 AND before December 31, 2024.

Example 5: Text Contains

{12.CT.'Premium'}

Filter: Plan Type (Field 12) | Contains | Premium

Shows records where the Plan Type field contains the word "Premium" (e.g., "Premium Plan", "Premium Customer").

Best Practices

  • Filter Active Records: Always filter out inactive, archived, or deleted records to prevent users from selecting invalid options. Use status-based filters like {6.EX.'Active'}.
  • Use AND for Narrowing: Use "All (AND)" when you want to narrow down results. Use "Any (OR)" when you want to show records matching multiple possible values.
  • Test Your Filters: Always test query filters in preview mode to ensure they return the expected records. Check that the dropdown shows the correct options.
  • Review Query Preview: The Query Filter Builder shows a preview of the generated QuickBase query. Review it to ensure it matches your intent before saving.
  • Keep Filters Simple: While you can create complex filters, simpler filters are easier to maintain and understand. Start with basic filters and add complexity only when needed.

Next Steps