---
title: "Example 1a: Show/hide a section on a component (Tables and fields approach)"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/5986910223/Example+1a%3A+Show%2Fhide+a+section+on+a+component+(Tables+and+fields+approach)"
format: markdown
---
For details, see: [https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5249990817](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5249990817) 



![Simulator Screenshot - iPhone 13 mini - 2025-01-09 at 17.21.57.png](media://5cc2bd80-214f-4c19-9f5a-8007d726bf0d)


### Configuration

- Add the following lines to `apps[number].screens[number].config.config.item.config.templateHeadline.config`

```json
{
  "config": {
    "condition": [
      {
        "table": "FIELDBUDDY__Work_Order__c",
        "field": "FIELDBUDDY__Template__c",
        "filter": "in",
        "value": ["Location"]
      }
    ],
    "dataBinding": [
      {
        "aggregationType": "$COUNT",
        "groupBy": "FIELDBUDDY__Installed_Product__c",
        "table": "FIELDBUDDY__Work_Order_Line_Item__c",
        "var": "COUNT"
      }
    ],
    "staticBinding": [
      {
        "name": "PRODUCTS",
        "text": "${Label.InstalledProductsOnLocation}",
        "type": "TEXT"
      }
    ],
    "dataText": "COUNT PRODUCTS"
  },
  "type": "FListItemTemplateHeadline"
}
```

A working example can be found in line 894 of [https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5986680865](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5986680865)