---
title: "items"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/5670535260/items"
format: markdown
---
Define options for Work Order Items (template table and so on)

<details>
<summary>Sample Items config</summary>

```
"items": {
    "table": "FIELDBUDDY__Work_Order_Item__c",
    "useDetailsAsChecklist": true,
    "cloneWoiToWoli": true,
    "useDisplayType": true,
    "hideStatus": false,
    "hideTotal": false,
    "chooseDefaultStatus": {
        "targetField": "FIELDBUDDY__Status__c",
        "targetValue": {
            "Open": {
                "executor": "jsonQuery",
                "type": "filter",
                "source": "${DATA}",
                "formula": "FIELDBUDDY__Work_Order__c[Id=${CURRENT_WORK_ORDER}&FIELDBUDDY__Type__c=INSPECTION]:isNotEmpty"
            },
            "Closed": {
                "executor": "jsonQuery",
                "type": "filter",
                "source": "${DATA}",
                "formula": "FIELDBUDDY__Work_Order__c[Id=${CURRENT_WORK_ORDER}&FIELDBUDDY__Type__c!=INSPECTION]:isNotEmpty"
            }
        }
    },
    "statistics": {
        "fieldName": "C",
        "fieldsToRequest": [
            "count(Id) C",
            "FIELDBUDDY__Type__c"
        ],
        "objectName": "FIELDBUDDY__Work_Order_Item__c",
        "groupBy": [
            "FIELDBUDDY__Type__c"
        ],
        "skipRecordsFromBriefcase": false
    },
    "icons": {
        "Activity": "wrench",
        "Part": "cube",
        "Other Expense": "credit-card",
        "Delete": "trash",
        "Add": "plus",
        "search-plus": "search-plus"
    },
    "limits": {
        "maxItemsToDisplay": 25,
        "maxResultToDisplay": 20
    }
},
```
</details>

| property | Description | Sample Value | Default |
| --- | --- | --- | --- |
| #### **table** | object, which stores information about template table | ```
"table": "FIELDBUDDY__Work_Order_Item__c"
``` |  |
| #### **cloneWoiToWoli** | Should be true if WOI with type details has to be used | ```
"cloneWoiToWoli": true
``` | false |
| #### **useDisplayType** | if true, Display Type on Work Order Item determines about the rendering<br>if false, the default rendering is applied using Quantity and Details.<br>if false, then the presence of a "woid" shows it as an item with details or, without a woid, a quantity item. The Display Type field is not taken into account. | ```
"useDisplayType": true
``` | **false** |
| #### **enableSorting** | allows to describe the order of a Work Order Line Items in Items tab via value on fields. Work Order Items will be sorted by ascending order (component FPartsWithOrderedFields) | ```
"enableSorting": [
	"FIELDBUDDY__Type__c",
	"FIELDBUDDY__Item_Code__c"
]
``` | no sorting applied |
| #### **hideStatus** | If true, hides the Status checkbox of the Work Order Line Item | ```
"hideStatus": true
``` | **false** |
| #### **hideTotal** | If true, hides the total count of items displayed when searching for items. | ```
"hideTotal": true
``` | **false** |
| #### **chooseDefaultStatus** | If present, the object defines the default value of Work Order Line Item. It uses jsonQuery. | ```
 "chooseDefaultStatus": {
    "targetField": "Status__c",
    "targetValue": {
        "Open": {
            "executor": "jsonQuery",
            "type": "filter",
            "source": "${DATA}",
            "formula": 	"Work_Order__c[Id=${CURRENT_WORK_ORDER}&Type__c=INSPECTION]"
        },
        "Closed": {
            "executor": "jsonQuery",
            "type": "filter",
            "source": "${DATA}",
            "formula": "Work_Order__c[Id=${CURRENT_WORK_ORDER}&Type__c!=INSPECTION]"
        }
    }
}
``` | **Closed** |
| #### **icons** | object, allows to assign icon to a Work Order Item's Type<br>To learn more about available icons, see Feature: [Set Up Icons for Timesheet's Types](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/3107915014)<br>by default, wrench is shown | ```
"icons": {
	"Activity": "wrench",
	"Add": "plus",
	"Delete": "trash",
	"Other Expense": "credit-card",
	"Error_Code": "exclamation-circle",
	"Warranty_Code": "certificate",
	"Part": "cube",
	"search-plus": "search-plus"
}
``` | **wrench** |
| #### **limits** | sets limits for the Work Order Items screen  
***maxItemsToDisplay*** is the max number rows that you see at first when you open a WOI screen  
while  
***maxResultToDisplay*** is the max number of search results | ```
"limits": {
	"maxItemsToDisplay": 250,
	"maxResultToDisplay": 10
}
``` | ```
"limits": {
	"maxItemsToDisplay": 25,
	"maxResultToDisplay": 20
}
``` |
| #### **statistics** | configuration for a query executed against the Salesforce API. It uses an aggregation framework that in this very implementation returns statistics: a Count per Type of Work Order Item | ```
"statistics": {
    "fieldName": "C",
    "fieldsToRequest": [
        "count(Id) C",
        "FIELDBUDDY__Type__c"
    ],
    "objectName": "FIELDBUDDY__Work_Order_Item__c",
    "groupBy": [
        "FIELDBUDDY__Type__c"
    ],
    "skipRecordsFromBriefcase": false
},
``` | ```
"statistics": {
    "fieldName": "C",
    "fieldsToRequest": [
        "count(Id) C",
        "FIELDBUDDY__Type__c"
    ],
    "objectName": "FIELDBUDDY__Work_Order_Item__c",
    "groupBy": [
        "FIELDBUDDY__Type__c"
    ],
    "skipRecordsFromBriefcase": false
},
``` |
| #### **supportedTypes** | Used to determine the action buttons displayed in the Item tab.<br>In the configuration we can map the values from the backend with the values that Swift expects ( in UPPERCASE ) | Hoshizaki's example:<br>```
"supportedTypes": {
	"PART": "Part",
	"OTHER_EXPENSE": "Other expense",
	"ACTIVITY": "Activity",
	"WARRANTY_CODE": "Warranty_Code",
	"ERROR_CODE": "Error_Code"
}
``` | ```
"supportedTypes": {
	"PART": "Part",
	"OTHER_EXPENSE": "Other expense",
	"ACTIVITY": "Activity"
}
``` |
| (DEPRECATED)<br>#### **attachments** | If true it displays the attachments buttons inside the Woli Edit Screen | "attachments":true | false |
| having the  orange button in the items tab | When you want the orange button to add atachments you look for this fragment in the cfg file and you add the line:<br>```
"actions": "${AddAttachments}",
```<br>otherwise you delete this line correctly.<br>(It can be halfway the cfg file) | ```
{
                  "body": {
                    "config": {
                      "params": {
                        "title": "${Label.Attachments}"
                      }
                    },
                    "type": "FAttachments"
                  },
                  "actions": "${AddAttachments}",
                  "header": {
                    "title": "${Label.Attachments}"
                  }
                },
``` |  |
| #### **useDetailsAsChecklist** | if true, it display the legacy checklist (of DisplayType = Details), as the Advanced Checklist,<br>using either **onGoInsertPlus** or **onGoEditPlus** event as a parameter.<br>In addition it shows  Work Order Items in the 1st tab of the Advanced Checklist based on parameters mentioned above or by using [FProperties](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/4350672933) config | ```
"useDetailsAsChecklist": false,
``` | ```
false
``` |
| #### **useInfiniteScrollChecklist** | if true, checklist is displayed as an infinite scroll, with tabs syncing with user’s scroll position in the checklist as they scroll up or down. | `true` | `false`(3.520.0.0)<br>`true` (3.520.1.0) |
| #### **openDetailsTab** | if **true**, the legacy checklist (of DisplayType = Details)'s initial tab is the “Details”.<br>Unless the Details are empty. | ```
openDetailsTab: true
``` | true |
| #### **initialNumToRenderOnDetailsTab** | if **openDetailsTab** is true,<br>**initialNumToRenderOnDetailsTab** decides how many Work Order (Line) Item Details are displayed initially when the Checklist is opened. It | ```
initialNumToRenderOnDetailsTab: 10
``` | 10 |
| #### **useApplicableProductTypes** | Only displays parts or checklists that **belong **to that Product type<br>if "FIELDBUDDY__Work_Order_Item__c.FIELDBUDDY__Applicable_Product_Types__c"<br>is empty - it is applied for every item no matter what Product Type is connected<br>"FIELDBUDDY__Work_Order_Item__c.FIELDBUDDY__Applicable_Product_Types__c" Needs to be present in the Briefcase | ```
"useApplicableProductTypes" : true
``` | true |
| #### **useApplicableWorkOrderTypes** | Only displays parts or checklists that **belong **to that WO type<br>if "FIELDBUDDY__Work_Order_Item__c.FIELDBUDDY__Applicable_Work_Order_Types__c"<br>is empty - it is applied for every item no matter what Work Order Type is connected<br>"FIELDBUDDY__Work_Order_Item__c.FIELDBUDDY__Applicable_Work_Order_Types__c" Needs to be present in the Briefcase | ```
"useApplicableWorkOrderTypes" : true
``` | true |
| #### **showApplicableTypesAsHashtags** | Display applicable type hashtags when adding Work Order Items<br>![image](media://412b80d2-ab2e-4319-a0ca-0d352c7bdbff) | ```
"showApplicableTypesAsHashtags" : true
``` | true |
| #### **showWolidsForTypeDetailsOnSummary** | Displays Work Order Line Item Details for each Work Order Line Item of Display Type = Details and Checklist.<br>**Note:**<br>- Items are displayed grouped by Pages (if they’re defined) and Order.
- Only item details with values are displayed except for item details of type: checkbox/boolean: those are shown always. | ```
"showWolidsForTypeDetailsOnSummary" : true
``` | false |
| **readonlyExceptions** | Allow the user to edit, delete or add items on a closed work order | ```
"readonlyExceptions" :{
    onEdit: false,
    onDelete: false,
    onAdd: false
},
``` | Everything as false |
| #### **checklistShowActions** | Display gallery, picture and comment icons in checklists | Object<br>```
"checklistShowActions":{
    "comments" : false,
     "attachments" : true
}
``` | Everything is true |
| #### **customFiltering** | Configures custom filtering feature.<br>- **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: the icon used in hashtags/badges on work order items. | ```json
"customFiltering": {
  "enabled": true,
  "workOrderField": "Work_Order_Field_Name__c",
  "workOrderItemField": "Work_Order_Item_Field_Name__c",
  "showAsHashtags": true,
  "hashtagIcon": "label"
}
``` | ```json
"customFiltering": {
  "enabled": false,
  "workOrderField": null,
  "workOrderItemField": null,
  "showAsHashtags": true,
  "hashtagIcon": "label"
}
``` |
| #### **checklist.icons** | Controls the icons used in checklists in icon and multi select picklists. | ```json
"checklist": {
  "icons": [
    { "database": "database" },
    { "work": "work" },
    { "dot": "dot" },
    { "plus": "plus" },
    { "plusCircle": "plusCircle" },
    { "minus": "minus" },
    { "minusCircle": "minusCircle" },
    { "home": "home" },
    { "comments": "comments" },
    { "warning": "warning" },
    { "check": "check" },
    { "wrong": "wrong" },
    { "commentsdots": "commentsdots" },
    { "file": "file" },
    { "block": "block" },
    { "wrench": "Wrench" },
    { "cube": "Cube" },
    { "card": "Card" },
    { "Ok": "check" }
  ]
}
``` | ```json
"checklist": {
  "icons": [
    { "database": "database" },
    { "work": "work" },
    { "dot": "dot" },
    { "plus": "plus" },
    { "plusCircle": "plusCircle" },
    { "minus": "minus" },
    { "minusCircle": "minusCircle" },
    { "home": "home" },
    { "comments": "comments" },
    { "warning": "warning" },
    { "check": "check" },
    { "wrong": "wrong" },
    { "commentsdots": "commentsdots" },
    { "file": "file" },
    { "block": "block" },
    { "wrench": "Wrench" },
    { "cube": "Cube" },
    { "card": "Card" },
    { "Ok": "check" }
  ]
}
``` |
| #### search | Please refer to [https://help.fieldbuddy.com/space/FBDOCS/7136084707/How+to+configure+Work+Order+Item+Search+Filtering+in+FieldBuddy+Swift%3F#3.-Configure-Item-Search-Filters-in-User-Configuration](https://help.fieldbuddy.com/space/FBDOCS/7136084707/How+to+configure+Work+Order+Item+Search+Filtering+in+FieldBuddy+Swift%3F#3.-Configure-Item-Search-Filters-in-User-Configuration) | ```json
{
    "search": {
        "Part": {
            "onlineLimitOfRecords": 55,
            "filters": [
                {
                    "type": "searchText",
                    "fields": [
                        "Name",
                        "FIELDBUDDY__Item_Code__c"
                    ]
                },
                {
                    "type": "picklist",
                    "field": "Manufacturer__c"
                },
                {
                    "type": "picklist",
                    "field": "Pricing_Category_Single__c"
                }
            ]
        }
    }
}
``` | none |