---
title: "How to configure Custom Filtering in FieldBuddy Swift?"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/6691553281/How+to+configure+Custom+Filtering+in+FieldBuddy+Swift%3F"
format: markdown
---
## What Is Custom Filtering?

**Custom Filtering** is a FieldBuddy Swift feature that allows administrators to control which Work Order Items technicians can add to a Work Order. The restriction is based on configurable fields on both:

- The **Work Order**
- The **Work Order Item**

Functionally, Custom Filtering is similar to the **[Applicable Work Order Types](https://help.fieldbuddy.com/space/FBDOCS/5383290896/How+to+configure+Work+Order+Items+filtering+for+Applicable+Work+Order+Types+and+Product+Types+in+Swift)** feature, but it offers additional flexibility and configuration options.

---

## Feature Comparison

| Feature | Custom Filtering | Applicable Work Order Types |
| --- | --- | --- |
| Restrict items based on a specific field on Work Order and Work Order Item | ✅ Supported | ✅ Supported |
| Configure which fields are used for filtering | ✅ Supported | ❌ Not Supported |
| Use Text fields for filtering | ✅ Supported | ❌ Not Supported |
| Configure icons for visual indicators of filters | ✅ Supported | ❌ Not Supported |

---

# How to Configure Custom Filtering

Follow the steps below to configure Custom Filtering correctly.

---

## 1. Choose Fields on Work Order and Work Order Item

First, decide which fields will control filtering.

If the required fields do not yet exist, create them before proceeding.

### Supported Field Types

#### Work Order Field

| Field Type | Supported |
| --- | --- |
| Picklist | ✅ |
| Picklist (Multi-select) | ❌ |
| Text | ✅ |

> ℹ️ Multi-select picklists are not supported on the **Work Order** level because many-to-many filtering from Work Order to Item is not yet supported.  
> ℹ️ If you require this capability, please contact us with your use case.

#### Work Order Item Field

| Field Type | Supported |
| --- | --- |
| Picklist | ✅ |
| Picklist (Multi-select) | ✅ |
| Text | ✅ |

---

## Choosing the Right Field Type

### Picklist vs. Text (General Guidance)

| Field Type | Pros | Cons |
| --- | --- | --- |
| **Picklist** | Easy to manage if values are entered manually | Multi-select picklists can cause issues when used with automations |
| **Text** | More flexible and automation-friendly (formulas, integrations, etc.) | Prone to human error when entered manually |

> ℹ️ If using a **Text field** and you need one-to-many filtering, separate multiple values using a semicolon (`;`). Example: `Starter;Professional`

---

## 2. Add Fields to the Briefcase

To ensure technicians receive the required data during sync, you must add the selected fields to the Briefcase configuration.

Add the fields to the appropriate target objects:

- `FIELDBUDDY__Work_Order__c`
- `FIELDBUDDY__Work_Order_Item__c`

This ensures both Work Order and Work Order Item fields are available offline.

---

## 3. Configure Custom Filtering in User Configuration

The main configuration is added under [items](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5670535260) in appSettings:

`appSettings.rules.items.customFiltering`

Example:

```json
"customFiltering": {
  "enabled": true,
  "workOrderField": "Work_Order_Field_Name__c",
  "workOrderItemField": "Work_Order_Item_Field_Name__c",
  "showAsHashtags": true,
  "hashtagIcon": "label"
}
```

### Configuration Options

- **enabled: **Must be set to `true` to activate the feature.
- **workOrderField: **The API name of the field on the Work Order object.
- **workOrderItemField: **The API name of the field on the Work Order Item object.
- **showAsHashtags** (optional but recommended): When set to `true`, filtering values appear as hashtags/badges under items in the UI.
- **hashtagIcon:** Icon used in the hashtag/badge element. All icons in the Material Community Icons are supported.

---

## Additional Configuration for Online-Only Items

If Work Order Items are also fetched online, you must also add the selected Work Order Item field to the Work Order Items screen under the [onlineSearchResult](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5377196080/Work+Order+Items#onlineSearchResults) component in user configuration

```
apps[name="WorkOrders"]
  .screens[name="WorkOrderItems"]
  .config.onlineSearchResults
  .config.recipe.fieldsToRequest
```

If this step is skipped, Custom Filtering will not work for online-only items.

---

# 🚀 Example Use Case: Tiered Service

## Scenario

Your organization uses a customer tier system:

- Starter
- Professional
- Enterprise
- (Empty / Unspecified)

You want technicians to see different Work Order Items depending on the customer’s tier.

---

## Item Setup

| Work Order Item | Description | Tier Value |
| --- | --- | --- |
| Generic Part | Available to all tiers | (empty) |
| Mediocre Part | Cheap, low-quality. Only for Starter | Starter |
| Budget Part | Affordable, decent quality. For Starter & Professional | Starter;Professional |
| Standard Part | Good quality, somewhat expensive. Only for Professional | Professional |
| Premium Part | High quality, expensive. For Professional & Enterprise | Professional;Enterprise |
| Top Quality Part | Highest quality, very expensive. Only for Enterprise | Enterprise |

There is also a duplicate online equivalent for each item, just to showcase that this feature also works with online only items.

### Visual Expectation

![Simulator Screenshot - iPhone 17 Pro - 2026-02-13 at 15.53.04.png](media://aa4d063d-bd86-406f-a0be-2dc4523ca04f)


![Simulator Screenshot - iPhone 17 Pro - 2026-02-13 at 15.53.46.png](media://84f3b88a-342f-40f0-b26d-d44077713ade)


![Simulator Screenshot - iPhone 17 Pro - 2026-02-13 at 15.55.19.png](media://4c826ef6-86ed-4c3a-a3b2-701fdc48b280)

![Simulator Screenshot - iPhone 17 Pro - 2026-02-13 at 15.55.26.png](media://30958866-c029-437e-8db2-c625ae1fb40e)

![Simulator Screenshot - iPhone 17 Pro - 2026-02-13 at 15.56.59.png](media://9ec2bbc1-2bd3-457f-b953-4801d83437d4)


---

## Implementation Steps

### Step 1 — Create Fields

- Work Order field: `Customer_Tier__c`
- Work Order Item field: `Tier__c`

---

### Step 2 — Add Fields to Briefcase

Add the following:

For Work Orders:

```
"Target": "FIELDBUDDY__Work_Order__c"
```

Add:

```
"Customer_Tier__c"
```

For Work Order Items:

```
"Target": "FIELDBUDDY__Work_Order_Item__c"
```

Add:

```
"Tier__c"
```

---

### Step 3 — Configure Custom Filtering

```json
"customFiltering": {
  "enabled": true,
  "workOrderField": "Customer_Tier__c",
  "workOrderItemField": "Tier__c",
}
```

If using online-only items, also add:

```
"Tier__c"
```

to:

```
apps[name="WorkOrders"]
  .screens[name="WorkOrderItems"]
  .config.onlineSearchResults
  .config.recipe.fieldsToRequest
```

---

## Result

Technicians will now only see the Work Order Items that match the tier of the customer on the current Work Order.

Configuration complete ✅