---
title: "Related Work Orders"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/3288006850/Related%20Work%20Orders"
format: markdown
---
> ⚠️ Related Work Orders is online-only feature! 
> ⚠️ 
> ⚠️ Also Files and Attachments are not shown for related work orders!

### Definition

Related Work Orders allows to show work orders which have common Service Request, Installed Product or Location to a current work order. 

This feature is handy when Swift user should see list of previously-done work orders, or work orders that his colleagues are working on.

Those are released and available since FieldBuddy Swift 3.471.0 release.

From version 3.490.2.2 and up, users can navigate to a work order summary of a related work order by pressing on the work order summary button of that work order on the related work order tab – without the need to the navigate to the details of the related work order.

### Screenshots:



### Video:

![image](media://c28364c7-4b82-4f6d-9cf4-44641b7cb138)



### **Configuration steps**

Related work orders feature is configured in 2 places

1. in AppSettings → rules → scopeNames ([https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5671190536](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5671190536) ) it is possible to define how to get respective related work orders to current one (via Service Request or via Installed Product for example)
2. in the tab Related ([https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5461114886](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5461114886) ) it is possible to configure how the list of related work orders looks like

#### Define scopes in appSettings.rules

Below are example scopes from Reference Configuration

<details>
<summary>example scopeNames</summary>

```
"scopeNames":{
    "relatedWorkOrdersForInstalledProduct":
    {
        "initAt":"FIELDBUDDY__Work_Order__c",
        "scope":[
            {
                
                "up": "FIELDBUDDY__Installed_Product__c",
                "down": "FIELDBUDDY__Work_Order__c",
                "relatedsObjectName":"FIELDBUDDY__Work_Order_Line_Item__c",
                "relatedObjectIsJunction":true
            },
            {
                "down": "FIELDBUDDY__Service_Request__r.Installed_Product__c",
                "up": "Id",
                "relatedsObjectName":"FIELDBUDDY__Installed_Product__c",
                "relatedObjectIsJunction":false
            }
        ]
    },
    "relatedWorkOrdersForLocation":{
        "initAt":"FIELDBUDDY__Work_Order__c",
        "scope":[
            {
                "up": "Id",
                "down": "FIELDBUDDY__Location__c",
                "relatedsObjectName":"FIELDBUDDY__Location__c",
                "relatedObjectIsJunction":false
            },
            {
                "up": "Id",
                "down": "FIELDBUDDY__Service_Request__r.FIELDBUDDY__Installed_Product__r.FIELDBUDDY__Location__c",
                "relatedsObjectName":"FIELDBUDDY__Location__c",
                "relatedObjectIsJunction":false
            }
        ]
    },
    "relatedWorkOrdersForServiceRequest":{
        "initAt":"FIELDBUDDY__Work_Order__c",
        "scope":[
            {
                "up": "Id",
                "down": "FIELDBUDDY__Service_Request__c",
                "relatedsObjectName":"FIELDBUDDY__Service_Request__c",
                "relatedObjectIsJunction":false
            }
        ]
    }
}
```
</details>

It is also possible to add conditions, for example (get non-installation work orders, older than 15 days, but not older than 90 days, check scope in previous example):

<details>
<summary>relatedWorkOrdersForInstalledProduct with filters</summary>

```json
 "scopeNames":{
  "relatedWorkOrdersForInstalledProduct":
    {
        "initAt":"FIELDBUDDY__Work_Order__c",
        "scope":[{}],
        "condition": {
            "conditions":[
              {
                "fieldName":"T_Start_Time__c",
                "operator": "<",
                "searchValue": "LAST_N_DAYS:15"
              },
              {
                "fieldName":"T_Start_Time__c",
                "operator": ">",
                "searchValue": "LAST_N_DAYS:90"
              },
                {
                "fieldName":"FIELDBUDDY__Type__c",
                "operator": "!=",
                "searchValue": "INSTALLATION"
              }
            ],
            "operator":"AND"
        }
}
```
</details>

More information about how to configure Related Work Orders can be found here

- [https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5461114886](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5461114886)
- [https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5461803010](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5461803010)