eSearch widget infotemplate title question

2727
6
05-23-2016 06:03 AM
RichBell
Occasional Contributor

Robert

1.) How do you defined what Layers should use a popup (infotemplate) as the default and others as needed?

2.) I found 2 issue using the Foldable Theme. Formatted numeric fields and the title heading in the infowindow popup.

See attached images.

A.) Formatted Fields(Cem.jpg, Parks.jpg)

Notice that if a field contains formatted numeric values it sometime will/will not show and cannot be turned off in the config file

B.) No title (Tax Map.jpg, Subdiv.jpg)

Notice that when a URL is defined the title name is disappearing and the URL link does not always show.

I have also attached my config files to see if there is something incorrect.

Thankss

Richard

6 Replies
RobertScheitlin__GISP
MVP Emeritus

Richard,

1.) How do you defined what Layers should use a popup (infotemplate) as the default and others as needed?

I am still not clear on this question. Can you elaborate?

Lets take just one of your configured search layers as an example of the issue I see in the configuration of that layer. It seems that you have done manual edits to the json as the UI should not allow these issues.

Layer: SubDivision Plats

  {

    "name":"Subdivision Plats",

    "url": "http://gisapp.mahoningcountyoh.gov/ArcGIS/rest/services/CADASTRAL/MapServer/17",

    "definitionexpression": "",

    "spatialsearchlayer": true,

    "zoomScale": 1200,

    "forceZoomScale": false,

    "shareResult": true,

    "addToAttrib": true,

    "expressions": {

      "expression": [

        {

          "alias": "Instrument Number",

          "textsearchlabel": "",

          "values": {

            "value": [

              {

                "fieldObj": {

                  "name":"INST_NUMBER",

                  "label": "Instrument Number",

                  "shortType": "number",

                  "type": "esriFieldTypeSmallInteger"

                },

                "valueObj": {

                  "value": ""

                },

                "prompt": "Search by Instrument Number",

                "textsearchhint": "Example: 200000023903",

                "sqltext": "upper(INST_NUMBER) = upper('[value]')",

                "operation": "stringOperatorIs",

                "uniquevalsfromfield": "INST_NUMBER",

                "operator": "AND"

              }

            ]

          }

        },

        {

          "alias": "Plat",

          "textsearchlabel": "Search by Plat Name",

          "values": {

            "value": [

              {

                "fieldObj": {

                  "name":"PLAT_NAME1",

                  "label": "Plat",

                  "shortType": "string",

                  "type": "esriFieldTypeString"

                },

                "valueObj": {

                  "value": ""

                },

                "prompt": "Select a Plat Name",

                "textsearchhint": "Example: HILLSIDE PLAT 11",

                "sqltext": "upper(PLAT_NAME1) = upper('[value]')",

                "operation": "stringOperatorIs",

                "uniquevalsfromfield": "PLAT_NAME1"

              }

            ]

          }

        },

        {

          "alias": "Vol & Pg",

          "textsearchlabel": "Search by Vol & Pg",

          "values": {

            "value": [

              {

                "fieldObj": {

                  "name":"VOL_PG1",

                  "label": "Vol & Pg",

                  "shortType": "string",

                  "type": "esriFieldTypeString"

                },

                "valueObj": {

                  "value": ""

                },

                "prompt": "Select a Vol & Pg",

                "textsearchhint": "Example: VOL 1 PG 101",

                "sqltext": "upper(VOL_PG1) LIKE upper('%[value]%')",

                "operation": "stringOperatorIs",

                "uniquevalsfromfield": "VOL_PG1"

              }

            ]

          }

        }

      ]

    },

    "titlefield":"Subdivision Plats",

    "fields": {

      "all": false,

      "field": [

        {

          "name":"MAP_LINK",

          "alias": "Instrument Number"

        },

        {

          "name":"PLAT_NAME1",

          "alias": "Plat"

        },

        {

          "name":"VOL_PG1",

          "alias": "Vol & Pg"

        }

      ]

    },

    "links": {

      "link": [

        {

          "alias": "Get Plat Image",

          "disablelinksifnull": true,

          "disableinpopup": false,

          "popuptype": "text",

          "content": "http://gistif.mahoningcountyoh.gov/PLATMAPS/{MAP_LINK}.pdf",

          "linkcontenthint": "",

          "icon": ""

        }

      ]

    },

    "orderByFields": ["MAP_LINK ASC"],

    "layersymbolfrom": "layer",

    "symbology": {

      "color": [

        108,

        151,

        203,

        0

      ],

      "outline": {

        "color": [

          0,

          32,

          156,

          255

        ],

        "width": 1.5,

        "type": "esriSLS",

        "style": "esriSLSSolid"

      },

      "type": "esriSFS",

      "style": "esriSFSSolid"

    }

  },

1. You have defined a search expression that use the field "INST_NUMBER" yet this field is not part of the fields list. This is a problem.

2. You have "titlefield":"Subdivision Plats". as the parameter says in its name this is suppose to be a field name not just some text.

Notice that if a field contains formatted numeric values it sometime will/will not show and cannot be turned off in the config file

Layer: Cemeteries

"titlefield":"Cemeteries",

      "fields": {

        "all": false,

        "field": [

          {

            "name":"NAME",

            "alias": "Name"

          },

          {

            "name":"ACRES",

            "alias": "Acres",

            "numberformat": "2|,|."

          },

          {

            "name":"SQ_MILES",

            "alias": "Sq. Miles",

            "numberformat": "2|,|.",

            "visible": false,

            "popuponly": true

          }

        ]

      },

Your use of visible: false is preventing this from appearing in the popup. visible: false is only used when you want the field to be used in a link and not to appear in the results or the popup. And again you use of titlefield is not an actual field.

0 Kudos
RichBell
Occasional Contributor

Robert,

I should have only posed 1 question at a time, Sorry

I made the changes to the subdivision config files as you informed me. No difference in results of the fields.

Ok I found the issue to resolve…..

I changed "shareResult": true, TO "shareResult": false

(The URL link will appear and work in the infowindow as it should, but then no info is available in the Attribute table)

Looks like something in the sharing of the results.

"name":"Subdivision Plats",

"url": "http://gisapp.mahoningcountyoh.gov/ArcGIS/rest/services/CADASTRAL/MapServer/17",

"definitionexpression": "",

"spatialsearchlayer": true,

"zoomScale": 1200,

"forceZoomScale": false,

"shareResult": false,

"addToAttrib": true,

"expressions": {

"expression": [

{

"alias": "Instrument Number",

"textsearchlabel": "",

"values": {

"value": [

{

"fieldObj": {

"name":"MAP_LINK",

"label": "Instrument Number",

"shortType": "number",

"type": "esriFieldTypeSmallInteger"

},

"valueObj": {

"value": ""

},

"prompt": "Search by Instrument Number",

"textsearchhint": "Example: 200000023903",

"sqltext": "upper(MAP_LINK) = upper('[value]')",

"operation": "stringOperatorIs",

"uniquevalsfromfield": "MAP_LINK",

"operator": "AND"

}

]

}

},

{

"alias": "Plat",

"textsearchlabel": "Search by Plat Name",

"values": {

"value": [

{

"fieldObj": {

"name":"PLAT_NAME1",

"label": "Plat",

"shortType": "string",

"type": "esriFieldTypeString"

},

"valueObj": {

"value": ""

},

"prompt": "Select a Plat Name",

"textsearchhint": "Example: HILLSIDE PLAT 11",

"sqltext": "upper(PLAT_NAME1) = upper('[value]')",

"operation": "stringOperatorIs",

"uniquevalsfromfield": "PLAT_NAME1"

}

]

}

},

{

"alias": "Vol & Pg",

"textsearchlabel": "Search by Vol & Pg",

"values": {

"value": [

{

"fieldObj": {

"name":"VOL_PG1",

"label": "Vol & Pg",

"shortType": "string",

"type": "esriFieldTypeString"

},

"valueObj": {

"value": ""

},

"prompt": "Select a Vol & Pg",

"textsearchhint": "Example: VOL 1 PG 101",

"sqltext": "upper(VOL_PG1) LIKE upper('%[value]%')",

"operation": "stringOperatorIs",

"uniquevalsfromfield": "VOL_PG1"

}

]

}

}

]

},

"titlefield":"MAP_LINK",

"fields": {

"all": false,

"field": [

{

"name":"MAP_LINK",

"alias": "Instrument Number"

},

{

"name":"PLAT_NAME1",

"alias": "Plat"

},

{

"name":"VOL_PG1",

"alias": "Vol & Pg"

}

]

},

"links": {

"link": [

{

"alias": "Get Plat Image",

"disablelinksifnull": false,

"disableinpopup": false,

"popuptype": "text",

"content": "http://gistif.mahoningcountyoh.gov/PLATMAPS/{MAP_LINK}.pdf",

"linkcontenthint": "",

"icon": ""

}

]

},

"orderByFields": ["MAP_LINK ASC"],

"layersymbolfrom": "layer",

"symbology": {

"color": [

108,

151,

203,

0

],

"outline": {

"color": [

0,

32,

156,

255

],

"width": 1.5,

"type": "esriSLS",

"style": "esriSLSSolid"

},

"type": "esriSFS",

"style": "esriSFSSolid"

}

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Richard,

Well I am not sure what is going on on your end then, as I copied the layer config you provided above and just changed the shareResult back to true and the popup worked and the link was shown and it worked to bring up the plat.

0 Kudos
RichBell
Occasional Contributor

Not to be a pain but we may be talking about 2 different things.

There is no infowindow popup “TITLE” when the "shareResult": false,

Not the title in the eSearch popup area, the infowindow area.

I am thinking this is a confilict with the LocalLayer widget 2.0.

This occurs with all layers now that I looked into it a little more.

Look at this config_Locallayer.. You will see no “title” in the infowindow when the item is selected.

"layerId": 1,

"title": "Tax Map Index (Historic)",

"fieldInfos": [

{

"fieldName": "TAX_MAP",

"label": "Tax Map:",

"visible": true

}

],

"showAttachments": false

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Richard,

  If you duplicate your app in WAB  (by click the duplicate option) and in that new duplicated app delete the eSearch widget from that app do you see the same issue with the title missing in the popup?

0 Kudos
RichBell
Occasional Contributor

I will try that soon, I really don’t use the WAB interface anymore.

But I may try the new version of the eSearch also… maybe that will fix it?

Thanks

Let you know

0 Kudos