how to remove Shape field from popup - ArcGIS Online / WebAppBuilder

1059
3
08-15-2017 01:48 PM
deleted-user-3QvhwBivZdaR
New Contributor III

I have a web app using WebAppBuilder, with services published from Server version 10.2.  Some (not all) of the popups I have configured for the layers show the 'Shape' filed...but I cannot find a way to remove it...this field is not listed in the field options when configuring the popup, and hiding the field disables any search functions.  I can't see why it is showing up at all, let alone why I see it in some but not all of the layer popups.  ideas?

0 Kudos
3 Replies
BillLotz
Occasional Contributor II

I know this is an old post, but I'm having this on ArcGIS 10.7, I can't see what it is showing up.

did you resolve this? Since you are a "deleted user" I understand if you don't reply!

0 Kudos
Anish_Adhikari
Occasional Contributor

First make a backup of your Webmap in ArcGIS Online or Portal. I am not sure if there is an easier way to do this but the way I was able to get rid of the Shape field was by using ArcGIS Online Assistant. You can do a web search to find ArcGIS Online Assistant. You will then log into either ArcGIS Online or Portal depending on where your web map is hosted. Find the map that you are having issues with either through search function using item id or browsing through the interface. After you find your map, you will click on I want to dropdown menu next to the search box. From the list select view an item's JSON. You will see JSON of “Description” and “Data” sections of the Web map. Now copy and Paste the JSON of Description and Data to separate text files and save the files in a location where you can easily access it later.  This is for backup purposes in case you mess things up during editing this file and your map or application becomes unusable. 

On the Data section there is an edit JSON button. Click on the button and the background becomes dark. This means you can now edit the file. Now open the "Data" text file you just saved for backup and do a search on your text editor with the layer name. For example, in my case my popup for the layer name “Lakes and Ponds” was displaying Shape field. So, I did a Search on my text editor for “Lakes and Ponds”. It found that search term on line 10000 something on my text document and you can see that the Shape field is set to “visible”: true.

{

                    "id": 2,

                    "popupInfo": {

                        "title": "Lakes and ponds",

                        "fieldInfos": [

                            {

                                "fieldName": "OBJECTID",

                                "label": "OBJECTID",

                                "isEditable": false,

                                "visible": false

                            },

                            {

                                "fieldName": "Shape",

                                "label": "Shape",

                                "isEditable": false,

                                "visible": true

                            },

Now, go to the corresponding line number in your ArcGIS Online Assistant’s data section’s JSON and change that value to “false” and click on the Save button. This should get rid of the Shape field in your popups.

 

Unfortunately, this happens to me a lot where either Shape field has shown up or when adding a layer to a previously existing layer group, it messes up with the popups where popups from one sublayer gets assigned to other sublayer. If possible, one precaution you can take is to add any new sub layers at the very bottom of the layer group, and it seems to work most of the time without having to reconfigure popups from scratch or resort to editing JSON from ArcGIS Online Assistant which should only be used as a last resort in my opinion.

BillLotz
Occasional Contributor II

Thanks Anish!

0 Kudos