Possible Bug in Collector

3821
4
06-09-2015 05:44 AM
JerryGarcia1
Occasional Contributor II

We have folks in the field using collector. The map and the feature service has been used before with no problems.  Yesterday we had fields deleting themselves as the form was being populated. So once the user got through most of the drop downs the data above would be deleted. The work around was to publish the same feature service into a new map. I should point out that this is not the first time this has happened. I meant to post something sooner but I almost never use the forums since they switched to geonet. Has anyone had this issue before? I originally thought that the feature service was the problem even though I have not altered it in any way since it was working....but using the same feature service in a different map works...makes no sense. 

0 Kudos
4 Replies
RandyBurton
MVP Alum

The behavior you describe suggests that the values are being replaced per a template instead of being inherited. If you get a warning message about changing feature types and deleting data, this would indicate such a situation.  I would suggest looking at the REST services (Service URL) - from My Content, click on the layer; in the Layers section you will find a link to the service url.  Look at any Templates that might show up.  All domains should say inherited.

0 Kudos
JerryGarcia1
Occasional Contributor II

Sorry for the late reply Randy.  I looked at the Domain and I did not see inherited but I am pretty sure that is not the issue. If it was I would not be able to use the collector at all and we had folks in the field using it hard for an entire day before it started acting funky. The republished map that works does not have inherited either and it is still working. Just saw that collector was updated and I am guessing that it somehow screwed with my feature class. I have been using Collector since the day it came out and there seems to be issues every time they update. It has to be a bug. Thanks for your help though.

0 Kudos
RandyBurton
MVP Alum

When I've had issues of fields being deleted/reset, I've found the issue in the JSON file using the REST API.  Typically, when you change the feature type (the symbology), it will follow a template prototype in the "types" section of the JSON file.  Often a field using a domain will be set to some value instead of being inherited.

In the example below, line 7 and 8, DomainOne and DomainTwo should be inherited.  Instead, if the feature type is changed from FeatureTypeTwo to FeatureTypeOne, the template section replaces certain attributes with the values shown in lines 17 through 21.  If the value of the attribute is null such as FieldOne and FieldTwo, line 17 and 18, the value of those fields should retain the previous value. For the fields using DomainOne and DomainTwo, lines 19 and 20, the value will be changed to a space in this example, thus deleting the previous value.  Changing the "double quote, space, double quote" to the word "null" should allow a previous value in that field to be properly inherited.

If such an issue is causing your problems, you can update the JSON file.  Should you need to update the file, I can share some tips.

  "types" : [
    {
      "id" : "FeatureTypeOne",
      "name" : "Feature Type Name",
      "domains" :
      {
        "DomainOne" : {"type" : "inherited"},
        "DomaineTwo" : {"type" : "inherited"}
      },
      "templates" : [
        {
          "name" : "Feature Type Name",
          "description" : "",
          "drawingTool" : "esriFeatureEditToolPoint",
          "prototype" : {
            "attributes" : {
              "FieldOne" : null,
              "FieldTwo" : null,
              "DomainOne" : " ",
              "DomainTwo" : " ",
              "MyFeature" : "FeatureTypeOne"
            }
          }
        }
      ]
    },
    {
      "id" : "FeatureTypeTwo",
....
BrendaFennel_GISP
New Contributor III

I had a similar problem around the middle of May (soon after the enhancements to symbols were released for the AGOL Web Map) ESRI support solution was to symbolize in desktop before publishing the service. I lost some data and had a heck of a time rebuilding the attachments (photos).  I had changed the symbols for a line feature in the web map (the service was based on LGIM SidewalksCurbRamps FC & had subtypes and domains) ...it continued to work perfectly well in the web map during an edit session. But when opened in Collector (on ipad) the schema of the feature service was destroyed! It switched the line and point feature attributes completely, lost all the domains and subtypes in both as well as in the second point feature class in the service.  I don't dare change the symbols in the web map again! at least not until the project is complete and I have a backup of the FS with attachments.  I plan to experiment with a copy of the data after the fact just to see if they have fixed whatever caused this.  I will let you know what happens...