PROBLEM

Park name is listed as 'undefined' on the search results in the Park and Recreation Finder

Last Published: April 25, 2020

Description

In the Park Finder application, when searching for a park by address, name, or activity, the park names are listed as 'undefined' in the results column.

ArcGIS for Local Government provides maps and apps that help implement GIS in a local government context, and a destination where users, partners, and the teams within Esri can collaborate.

Cause

The alias listed in the application's configuration file for the park name field does not match the park search service's definition.

Solution or Workaround



  1. Navigate to <installation folder> and open the config.txt file for editing.
  2. In the config.txt file, find the URL of the service specified for the 'DevPlanLayer'.

    For example, this might be similar to the following:

    http://localgovtemplates2.esri.com/ArcGIS/rest/services/Planning/Parks/MapServer/0

  3. In a web browser, go to the DevPlanLayer URL. In the Fields list, find the field that represents the 'undefined' facility in the search results list.

    For example, this might be NAME, or FacilitySitePoint.NAME, or some other field.

  4. Make note of the field's Alias text.

    For example, you might see:

    FacilitySitePoint.NAME (Type: esriFieldTypeString, Alias: Park Name, Length: 255)

    or

    FacilitySitePoint.NAME (Type: esriFieldTypeString, Alias: Name of Facility, Length: 255)

    or

    FacilitySitePoint.NAME (Type: esriFieldTypeString, Alias: Facility Name, Length: 255)

  5. Back in the config.txt file, find the configuration item called 'InfoWindowHeader'.

    Code:
    'InfoWindowHeader' : [
    {"FieldName":"FacilitySitePoint.NAME","Alias":"Park Name"}
    ],

  6. Set the value associated with the FieldName tag to the name of the field chosen in Step 3, and set the value associated with the Alias tag, identified in Step 4, to the Alias text for that field.

    For example, if the following field was selected from a service,

    FacilityName (Type: esriFieldTypeString, Alias: Name of Facility, Length: 255)

    the InfoWindowHeader would be changed to the following to use that field.

    Code:
    'InfoWindowHeader' : [
    {"FieldName":"FacilityName","Alias":"Name of Facility"}
    ],

  7. Save the config.txt file.

Article ID:000011571

Software:
  • ArcGIS for Local Government

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic