Hi,
Just wanting ESRI to know that when setting default numerical values on integer fields using the template editor on a webmap, or by adding a new integer field with a default value it wraps the value in quotes in the rest admin URL. This causes Collector for ArcGIS to crash on iOS devices when attempting to change the default integer value to something else.
edited for more info:
The crash seems to only affect integer fields with default values. Any time a default value is added to an integer field, the default value is stored in the Feature service rest admin url wrapped in quotes. The quotes do not show up anywhere, much like how it behaves if you have text field with default values. If that text field had the quotes removed from it's default value in the rest url admin-update definition, it does cause instability and crashes. The problem here is reversed with integers.
Doubles seem to work regardless of their default value being wrapped in quotes or not in the rest url. And text, well since their defaults are wrapped in quotes, as it should be, there is no problem. Only seems to be integer related.
The problem only affects collector on iOS devices (iPhone 6 and iPad are affected), it is not a problem on Android or on PC web maps. Have not tested on Win10 devices or PC web apps.
Reproducing the crash conditions method 1:
- Publish a basic feature service (no template/defaults setup)
- Add the new feature service layer to a new web map in ArcGIS online
- Click table
- Click Table Options
- Click add field
- Add a integer field with a default numerical value of 1
- Save your map as Crash test 1
Reproducing the crash conditions method 2:
- Publish a basic feature service with an integer field (no template/defaults setup)
- Add the new feature service layer to a new web map
- Click edit
- Click Manage
- Click properties on the layer
- Add a default numerical value of 1 to the integer field
- Click done
- Click Save Changes
- Save your map as Crash test 2
Reproducing the crash:
- Open up collector on a iOS device
- Open Crash test 1 map
- Add new feature
- Attempt to change the integer field that has default value
- Crash occurs once the field is tapped
- Repeat for Crash test 2 map
Solution for meantime:
- Go to your feature service layer's admin rest URL
- Click Update Definition
- Set Last Edit date to double quotes ""
- Scroll down and find the template for new features near the bottom
- Find your integer field with the default value
- Remove the quotes wrapped around the default numerical value
- Click Update layer definition
- Now when adding a new feature and changing the default integer field on either Crash test 1 or Crash test 2 maps on a iOS device, the problem is no more.