AnsweredAssumed Answered

iOS Collector Crash with integer Default Values wrapped in quotes....

Question asked by AaronCraig on Sep 27, 2016
Latest reply on Oct 3, 2016 by AaronCraig



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:
  1. Publish a basic feature service (no template/defaults setup)
  2. Add the new feature service layer to a new web map in ArcGIS online
  3. Click table
  4. Click Table Options
  5. Click add field
  6. Add a integer field with a default numerical value of 1
  7. Save your map as Crash test 1



Reproducing the crash conditions method 2:

  1. Publish a basic feature service with an integer field (no template/defaults setup)
  2. Add the new feature service layer to a new web map
  3. Click edit
  4. Click Manage
  5. Click properties on the layer
  6. Add a default numerical value of 1 to the integer field
  7. Click done
  8. Click Save Changes
  9. Save your map as Crash test 2


Reproducing the crash:
  1. Open up collector on a iOS device
  2. Open Crash test 1 map
  3. Add new feature
  4. Attempt to change the integer field that has default value
  5. Crash occurs once the field is tapped
  6. Repeat for Crash test 2 map


Solution for meantime:
  1. Go to your feature service layer's admin rest URL
  2. Click Update Definition
  3. Set Last Edit date to double quotes ""
  4. Scroll down and find the template for new features near the bottom
  5. Find your integer field with the default value
  6. Remove the quotes wrapped around the default numerical value
  7. Click Update layer definition
  8. 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.