Enable ObjectID field for Find Locations and web map url parameters

860
6
Jump to solution
11-22-2018 08:50 AM
Lake_Country_GIS
New Contributor III

I would like to pass in a features OBJECTID as a web map URL parameter and zoom to that feature. It appears I cannot use OBJECTID on the Find Locations configuration portion of the Web Map settings page. I do not see that field in the available fields dropdown. Is it possible to allow the OBJECTID field to be searchable?

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

You can do this using ArcGIS Online Assistant.

ArcGIS Online Assistant 

  1. Choose "I want to": "View an item's JSON"
  2. Go down to the "Data" window and click on the pencil button for edit.
  3. Edit the application properties > search > layers > field
    "applicationProperties": {
        "viewing": {
            "routing": {
                "enabled": true
            },
            "measure": {
                "enabled": true
            },
            "basemapGallery": {
                "enabled": true
            },
            "search": {
                "enabled": true,
                "disablePlaceFinder": false,
                "hintText": "Place or Address",
                "layers": [
                    {
                        "id": "Damage_Assessments_March_2018_8420",
                        "field": {
                            "name": "ObjectId",
                            "exactMatch": true,
                            "type": "esriFieldTypeOid"
                        }
                    }
                ]
            }
        }
    }

View solution in original post

6 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

You can do this using ArcGIS Online Assistant.

ArcGIS Online Assistant 

  1. Choose "I want to": "View an item's JSON"
  2. Go down to the "Data" window and click on the pencil button for edit.
  3. Edit the application properties > search > layers > field
    "applicationProperties": {
        "viewing": {
            "routing": {
                "enabled": true
            },
            "measure": {
                "enabled": true
            },
            "basemapGallery": {
                "enabled": true
            },
            "search": {
                "enabled": true,
                "disablePlaceFinder": false,
                "hintText": "Place or Address",
                "layers": [
                    {
                        "id": "Damage_Assessments_March_2018_8420",
                        "field": {
                            "name": "ObjectId",
                            "exactMatch": true,
                            "type": "esriFieldTypeOid"
                        }
                    }
                ]
            }
        }
    }
Lake_Country_GIS
New Contributor III

Thanks for the heads up and prompt reply. Then, is this the correct way to add to my URL?

/home/webmap/viewer.html?webmap=35094f1e8f6a4ef3be7791998e37008e&find=27

where '27' is a record with ObjectID=27

Thanks again,

Mark

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Mark,

   Yes that is correct.

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

0 Kudos
Lake_Country_GIS
New Contributor III

Do you know if this functionality is supported in one of the original ArcGIS Online templates : "Edit Template"?

https://www.arcgis.com/home/item.html?id=48d017e94e3d4567a8b81b78352e63cd 

I can't seem to get the URL parmeter to work there.

Cheers,

Mark

0 Kudos
PanGIS
by
Regular Contributor

@RobertScheitlin__GISP 

Hi Robert, this is great!

I wanted to ask you if it would be possible to enable it on GlobalId as well.

I am too afraid of screwing up everything. :grinning_face_with_sweat:

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

@PanGIS 

Sorry I do not know if that is possible or not.