---
title: "Reference qualifiers"
site: admin
version: 2027.1
versions: "all"
url: https://docs-new.servicely.ai/admin/2027.1/data-model/reference-qualifiers/
type: reference
application: platform
last_updated: 2026-12-03
commit: 6777698daac5
---


A reference qualifier limits the records a reference field offers, for administrators who need, say, a Location field to show only the locations of the record's company. This page lists its fields and shows a scripted qualifier.

For the same filter on Service Catalog questions, see [Filter the records a reference question offers](page:catalog/reference-filters).

<Callout type="info">
  **Changed in 2027.1.** A qualifier now sees the values on the form, including changes not yet saved. Before, it saw the record as last saved. Each reference field can also set the order of its dropdown.
</Callout>

## Reference qualifier fields

Reference qualifiers are kept under **Data model → References & queries → Reference qualifiers**, in the Administration workspace. The examples set up a qualifier on the Location field of Incident.

<Image src="asset:screenshots/admin/data-model-reference-qualifiers/reference-qualifiers-menu.png">The Reference qualifiers item in the References & queries section of the Data model menu.</Image>

| Field | Required | What it holds | Example |
| --- | --- | --- | --- |
| Name | Yes | The name of the qualifier. | Incident - Location based on selected Company |
| Table | Yes | The table that has the reference field. | Incident |
| Field | Yes | The reference field the qualifier applies to. | Location |
| Active | No | Whether the qualifier applies. The default is Yes. | Yes |
| Target table | No | Filled in for you. The table the reference field points to. The qualifier filters this table. | Location |
| Description | No | A note for administrators. | Shows the locations of the incident's company. |
| Advanced | No | Set to Yes to use **Script** instead of **Condition**. | No |
| Condition | No | A condition built with the condition builder. It runs on the target table, not on the table with the field. | See the image below. |
| Script | No | A script that returns a query on the target table. Use it when the condition depends on the record's own values. | See the example below. |

The image shows a qualifier Servicely ships. It limits the Company field of Work to companies that are selectable.

<Image src="asset:screenshots/admin/data-model-reference-qualifiers/qualifier-condition.png" size="70">A shipped reference qualifier on the Company field of Work, with its condition.</Image>

## Scripted qualifiers

A script runs when the user opens the reference field. It runs against the target table, and `current` holds the record the user is editing, with the values currently on the form. The script returns a table record query. The query functions are described in [Table](page:api/scripting/records/table).

This script limits Location on an incident. If the incident has a company, the field offers selectable locations of that company. If not, it offers all selectable locations.

```javascript
if (current.Company.hasValue()) {
    AND(
        EQUAL("Company", current.Company.value()),
        EQUAL("Selectable", true)
    );
} else {
    EQUAL("Selectable", true);
}
```

If the user changes Company on the form, the script sees the new company before the record is saved.

## Sort the records a reference field offers

A reference field's dropdown lists records by its first display field unless you set an order. To set one, add the renderer property `dropdown.orderBy` to the field. Its value is a comma-separated list of field names. Put `-` before a name to sort that field in descending order, for example `-Schedule,Name`.

The field's own property wins. Without one, the dropdown uses the property on the relationship. A property on the target table sets the default for every reference to it. See [Table, field and renderer properties](page:data-model/table-and-field-properties).

## Related

- [Field types](page:data-model/field-types)
- [Table, field and renderer properties](page:data-model/table-and-field-properties)
- [Query functions](page:data-model/query-functions)
- [Filter the records a reference question offers](page:catalog/reference-filters)
