Skip to content

Grid with Address in a Single Column

1 Purpose

Address fields are extracted from the geoJSON object one at a time. These can be displayed in a column for each address field or in a single column by concatenating the address fields as show in this example.

2 Template Example

  "components": [
        {
            "componentName": "sc-static-html",
            "fullWidth": true,
            "name": "panelStyle",
            "html": "<style>.panel-A {background: #ffffff;border:0px} .panel-A > .panel-heading {font-size:1.25em;height:35px;line-height:16px; color:#ffffff ; background: #000000} </style>"
        },
        {
            "componentName": "sc-static-html",
            "fullWidth": true,
            "name": "panelTP",
            "label": "Templates",
            "wrapAction": "open",
            "wrapHtmlType": "wrap",
            "wrapClass": "panel-A"
        },
      {
            "componentName": "sc-datatables",
            "name": "reportGrid",
            "label": " ",
            "listAllDocuments": false,
            "gridColumns": [
                {
                    "displayName": "Name",
                    "field": "systemHeader.summaryName",
                    "width": 4,
                    "enableColumnResizing": true,
                    "enableColumnMoving": true,
                    "href": "/#/form/{{{documentId}}}",
                    "type": "url",
                    "urlOpenIn": "newWindow",
                    "sort": {
                        "precedence": 1,
                        "direction": "asc"
                    }
                },
                {
                    "displayName": "Start Address",
                    "field": "locationStartGeo",
                    "cellTemplate": "<div>{{row.locationStartGeo.features[0].properties.streetNo}} {{row.locationStartGeo.features[0].properties.street}} {{row.locationStartGeo.features[0].properties.suburb}}</div>",
                    "width": 1,
                    "enableColumnResizing": true,
                    "enableColumnMoving": true,
                    "type": "string"
                }
            ],
            "fullWidth": true,
            "filter": "{'query':{'bool':{'filter':[{'term':{'systemHeader.systemType':'document'}},{'term':{'systemHeader.templateId':'fd138380-69e2-11e8-ba94-5709595b6655'}},{'range':{'startDate':{'gte':'now-14d'}}}]}}}",
            "showReload": true,
            "delayBeforeCallNum": 200,
            "disableSave": true,
            "columnSearch": true
        },
        {
            "componentName": "sc-static-html",
            "wrapHtmlType": "wrap",
            "wrapAction": "close",
            "name": "panelTP"
        }
    ],
    "appTags": [
        "formbird",
        "support",
        "adminReport"
    ],
    "formColor": "#1B132D",
    "hideCommandBar": true