---
title: "FHistory"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/5461803010/FHistory"
format: markdown
---
![image-20240219-170140.png](media://f005c4cb-87a4-4fda-acf5-9d9fdf22110a)

FHistory component is a component that show list of boxes with the Work Orders that are related to the common one.

It is possible to adjust how much records are shown per page (10 is the most optimal one, as well as change card header, body and Footer









### Structure

<details>
<summary>Config Structure</summary>

```
{
    "config": {
            "params": {
                "title": "${Label.Related}"
            },
            "filters": [
              //Various groups
            ],
            "itemsPerPage": 10,
            "item": {
                "config": {
                    "item": {
                        "config": {
                            "sections": [
                                {
                                    "table": "FIELDBUDDY__Work_Order__c",
                                    "objects": [],
                                    "type": "CardHeader",
                                    "config": {
                                        "sections": [
                                            //Header
                                        ]
                                    }
                                },
                                {
                                    "type": "CardBody",
                                    "table": "FIELDBUDDY__Work_Order__c",
                                    "objects": [],
                                    "config": {
                                        "sections":[
                                            //BODY
                                        ]
                                    }
                                },
                                {
                                    "table": "FIELDBUDDY__Work_Order__c",
                                    "objects": [],
                                    "type": "CardFooter",
                                    "config": {
                                        "item": {
                                            "type": "ItemSummary",
                                            "config": {}
                                        }
                                    }
                                }
                            ]
                        },
                        "type": "Card"
                    }
                },
                "type": "Box"
            }
        },
        "type": "FHistory"
    }
```
</details>

### Description

| **Property Name** | **Example** | **Explanation** |
| --- | --- | --- |
| `filters` |  | an array of elements in following format that describe for which scope for which condition is being used  
`scopeName` is name of the scope<br>```
{
  "condition": {
    "conditions": [
      {
        "formula": "FIELDBUDDY__Work_Order__c[Id=${CURRENT_WORK_ORDER}]:isLocationBased"
      }
    ],
    "operator": "OR"
  },
  "table": "FIELDBUDDY__Work_Order__c",
  "field": "FIELDBUDDY__Location__c",
  "operator": "=",
  "dynamic": "true",
  "scopeName": "relatedWorkOrdersForLocation",
  "value": "",
  "label": "${Label.Location}",
  "defaultText": "Location",
  "active": true,
  "unique": true,
  "hidden": true
},
``` |
| `item` |  | Items contains fixed structure with 3 sections that has following structure. It should not be changed, only respective CardHeader or CardBody components |
| `CardHeader` section | ![image-20250203-101609.png](media://c8c24607-bd65-444f-848c-fcd02ab70b4d) | Array of elements in following format  
table and field are referring to API name of table/field.<br>It is also possible to specify format of date time fields only  
( `"format":"yyyy-mm-dd HH:mm:")`<br>```
{
    "table": "FIELDBUDDY__Work_Order__c",
    "objects": [],
    "type": "Box",
    "config": {
        "item": {
            "type": "LabelValue",
            "config": {
                "dataBinding": [
                    {
                        "table": "FIELDBUDDY__Work_Order__c",
                        "field": "T_Start_Time__c"
                    }
                ]
            }
        }
    }
}
``` |
| `CardBody`section | ![image-20250203-101646.png](media://ccd8545f-182f-4bcb-be6f-f9d0a7d58576) | Contains fields shown in a main block<br>```
{
    "type": "CardBody",
    "table": "FIELDBUDDY__Work_Order__c",
    "objects": [],
    "config": {
        "sections": [
          ///
        ]
    }
},
```<br>Each section is one field in following format, it is possible to conditionally mention what to show<br>```
{
    "table": "FIELDBUDDY__Work_Order__c",
    "objects": [],
    "type": "Box",
    "config": {
        "condition": {
            "conditions": [
                {
                    "formula": "FIELDBUDDY__Work_Order__c[Id=CURRENT_RELATED_WORK_ORDER]:isServiceRequestBased"
                }
            ],
            "operator": "AND"
        },
        "item": {
            "type": "LabelValue",
            "config": {
                "display": "inline",
                "dataBinding": [
                    {
                        "table": "FIELDBUDDY__Service_Request__c",
                        "field": "FIELDBUDDY__Installed_Product__c"
                    }
                ]
            }
        }
    }
},
``` |
| `CardFooter` section | ![image-20250203-101715.png](media://4e961eed-82d5-4d59-89e1-2a798f7e59df) | Should not be changed<br>```
{
    "table": "FIELDBUDDY__Work_Order__c",
    "objects": [],
    "type": "CardFooter",
    "config": {
        "item": {
            "type": "ItemSummary",
            "config": {}
        }
    }
}
``` |


Reference config

<details>
<summary>Reference config</summary>

```
{
    "body": {
        "config": {
            "params": {
                "title": "${Label.Related}"
            },
            "filters": [
                {
                    "condition": {
                        "conditions": [
                            {
                                "formula": "FIELDBUDDY__Work_Order__c[Id=${CURRENT_WORK_ORDER}]:isLocationBased"
                            }
                        ],
                        "operator": "OR"
                    },
                    "table": "FIELDBUDDY__Work_Order__c",
                    "field": "FIELDBUDDY__Location__c",
                    "operator": "=",
                    "dynamic": "true",
                    "scopeName": "relatedWorkOrdersForLocation",
                    "value": "",
                    "label": "${Label.Location}",
                    "defaultText": "Location",
                    "active": true,
                    "unique": true,
                    "hidden": true
                },
                {
                    "condition": {
                        "conditions": [
                            {
                                "formula": "FIELDBUDDY__Work_Order__c[Id=${CURRENT_WORK_ORDER}]:isServiceRequestBased"
                            }
                        ],
                        "operator": "OR"
                    },
                    "table": "FIELDBUDDY__Installed_Product__c",
                    "field": "FIELDBUDDY__Location__c",
                    "operator": "=",
                    "dynamic": "true",
                    "scopeName": "relatedWorkOrdersForLocation",
                    "value": "",
                    "label": "${Label.Location}",
                    "defaultText": "Location",
                    "active": true,
                    "unique": true
                },
                {
                    "condition": {
                        "conditions": [
                            {
                                "formula": "FIELDBUDDY__Work_Order__c[Id=${CURRENT_WORK_ORDER}]:isServiceRequestBased"
                            }
                        ],
                        "operator": "OR"
                    },
                    "table": "FIELDBUDDY__Work_Order__c",
                    "field": "FIELDBUDDY__Service_Request__c",
                    "operator": "=",
                    "dynamic": "true",
                    "scopeName": "relatedWorkOrdersForServiceRequest",
                    "label": "${Label.ServiceRequest}",
                    "defaultText": "Service Request",
                    "active": false,
                    "unique": true
                },
                {
                    "condition": {
                        "conditions": [
                            {
                                "formula": "FIELDBUDDY__Work_Order__c[Id=${CURRENT_WORK_ORDER}]:isServiceRequestBased"
                            }
                        ],
                        "operator": "OR"
                    },
                    "table": "FIELDBUDDY__Service_Request__c",
                    "field": "FIELDBUDDY__Installed_Product__c",
                    "operator": "=",
                    "dynamic": "true",
                    "scopeName": "relatedWorkOrdersForInstalledProduct",
                    "value": "",
                    "label": "${Label.Installations}",
                    "defaultText": "Installation",
                    "active": false,
                    "unique": true
                }
            ],
            "itemsPerPage": 10,
            "item": {
                "config": {
                    "item": {
                        "config": {
                            "sections": [
                                {
                                    "table": "FIELDBUDDY__Work_Order__c",
                                    "objects": [],
                                    "type": "CardHeader",
                                    "config": {
                                        "sections": [
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Work_Order__c",
                                                                    "field": "T_Start_Time__c"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Work_Order__c",
                                                                    "field": "Name"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Work_Order__c",
                                                                    "field": "FIELDBUDDY__Status__c",
                                                                    "var": "_STATUS_"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                {
                                    "type": "CardBody",
                                    "table": "FIELDBUDDY__Work_Order__c",
                                    "objects": [],
                                    "config": {
                                        "sections": [
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "condition": {
                                                        "conditions": [
                                                            {
                                                                "formula": "FIELDBUDDY__Work_Order__c[Id=CURRENT_RELATED_WORK_ORDER]:isServiceRequestBased"
                                                            }
                                                        ],
                                                        "operator": "AND"
                                                    },
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "display": "inline",
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Service_Request__c",
                                                                    "field": "Name"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "condition": {
                                                        "conditions": [
                                                            {
                                                                "formula": "FIELDBUDDY__Work_Order__c[Id=CURRENT_RELATED_WORK_ORDER]:isServiceRequestBased"
                                                            }
                                                        ],
                                                        "operator": "AND"
                                                    },
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "display": "inline",
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Service_Request__c",
                                                                    "field": "FIELDBUDDY__Subject__c"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "condition": {
                                                        "conditions": [
                                                            {
                                                                "formula": "FIELDBUDDY__Work_Order__c[Id=CURRENT_RELATED_WORK_ORDER]:isServiceRequestBased"
                                                            }
                                                        ],
                                                        "operator": "AND"
                                                    },
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "display": "inline",
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Service_Request__c",
                                                                    "field": "FIELDBUDDY__Description__c"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "display": "inline",
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Work_Order__c",
                                                                    "field": "FIELDBUDDY__Closure_Status__c"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "display": "inline",
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Work_Order__c",
                                                                    "field": "FIELDBUDDY__Type__c"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "display": "inline",
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Work_Order__c",
                                                                    "field": "FIELDBUDDY__Comments_from_Technician__c"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "display": "inline",
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Work_Order__c",
                                                                    "field": "FIELDBUDDY__Comments_from_Backoffice__c"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "condition": {
                                                        "conditions": [
                                                            {
                                                                "formula": "FIELDBUDDY__Work_Order__c[Id=CURRENT_RELATED_WORK_ORDER]:isServiceRequestBased"
                                                            }
                                                        ],
                                                        "operator": "AND"
                                                    },
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "display": "inline",
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Service_Request__c",
                                                                    "field": "FIELDBUDDY__Installed_Product__c"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "table": "FIELDBUDDY__Work_Order__c",
                                                "objects": [],
                                                "type": "Box",
                                                "config": {
                                                    "item": {
                                                        "type": "LabelValue",
                                                        "config": {
                                                            "display": "inline",
                                                            "dataBinding": [
                                                                {
                                                                    "table": "FIELDBUDDY__Work_Order__c",
                                                                    "field": "OwnerId"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                {
                                    "table": "FIELDBUDDY__Work_Order__c",
                                    "objects": [],
                                    "type": "CardFooter",
                                    "config": {
                                        "item": {
                                            "type": "ItemSummary",
                                            "config": {}
                                        }
                                    }
                                }
                            ]
                        },
                        "type": "Card"
                    }
                },
                "type": "Box"
            }
        },
        "type": "FHistory"
    },
    "header": {
        "title": "${Label.Related}"
    }
}
```
</details>