Changing Feature Type resets values in other fields

7368
15
Jump to solution
06-24-2014 01:33 PM
RandyBurton
MVP Alum
I have noticed that Collector will reset some fields that use a domain value but not others when the field that is used to set the symbol (feature type). Collector will give a warning message about �??Changing Feature Type.�?�  If yes is selected then those fields to the left (in the original geodatabase field order) that use a domain look-up value are reset; those using domain look-up values to the right are unchanged. Changing the field order of the form will not change which fields are reset.  This is the behavior in both iOS and Android.

A similar issue was described in the forum about two years ago.

Has anyone found a solution?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RandyBurton
MVP Alum
With Russ' help, I was able to come up with a solution.

When I created the database, I had set a few fields to a default value.  When the Feature Type was changed, those fields with a default setting would delete the current value and use the default.  Fields with no default value setting would retain the current value.  I deleted the default settings and reposted the feature class to AGOL.

View solution in original post

0 Kudos
15 Replies
RussRoberts
Esri Notable Contributor
I would like to see your service to see how the data model is laid out but values will be reset if they are not listed as inherited in the REST data model under the template.

Russ
0 Kudos
BrandonKeinath1
Occasional Contributor III

Hi Russ,

I'm having a similar issue but we're using ArcGIS Server 10.2.2.  Reading through Randy's replies it seems like removing the default values fixed the issue, but we aren't using default values.  Could it be the inheritance issue you describe?

Thanks,


Brandon

0 Kudos
RandyBurton
MVP Alum
Russ, I sent an invite and PM.  I appreciate your assistance.
0 Kudos
RandyBurton
MVP Alum
With Russ' help, I was able to come up with a solution.

When I created the database, I had set a few fields to a default value.  When the Feature Type was changed, those fields with a default setting would delete the current value and use the default.  Fields with no default value setting would retain the current value.  I deleted the default settings and reposted the feature class to AGOL.
0 Kudos
mnitdotgis
New Contributor

I am having this same issue and as Russ suggested to check if they are listed as inherited under the templates in the REST services. I have domains with default value. Is there a solution without removing the defaults?

Thanks

Abdi

0 Kudos
GIS_System_AdministratorSunshi
New Contributor III

Hi there

I am experiencing this issue...but not sure how / where you set this inheritance.

I have a field with Allow Null Values = NO

And a domain set. - YES / NO

I have no subtypes etc.

Could someone shed some light in how to change this

0 Kudos
RandyBurton
MVP Alum

If you are comfortable with using the REST API to edit the json file ...

In the types section of your feature service, each type has a template section.  When you change the attribute that controls the symbology, it will use the this template to set default values.  Using the example json below, when your feature's symbol attribute is set to "SymbolValue", the template will set Atribute1 to use "SomeValue" and Attribute2 will be inherited because its value is null.  If you want Attribute1 to be inherited, replace "SomeValue" (in line  20) with the word null (it will then look similar to line 21).  You do not want to change "SymbolValue" (line 19 in the example) as it sets your symbology.

When working with the REST API, you should backup your feature service before making changes.  Experiment with a test feature service to become familiar with the REST API.  Use jsonlint.com​ to validate your json.  I would also suggest that you only update the types section with the API.

{
"types": [{
  "id": "SymbolValue",
  "name": "SymbolAttribute",
  "domains": {
  "Attribute1": {
    "type": "inherited"
  },
  "Attribute2": {
    "type": "inherited"
  }
  },
  "templates": [{
  "name": "SymbolAttribute",
  "description": "",
  "drawingTool": "esriFeatureEditToolPoint",
  "prototype": {
    "attributes": {
    "Symbol": "SymbolValue",
    "Attribute1": "SomeValue",
    "Attribute2": null
    }
  }
  }]
}]
}
CardnoNew
New Contributor

Immediately after the release of Collector Version 10.4.1, I have suddenly started having this problem.

My template  attributes are set to null in json so that does not appear to be the issue. 

Can anyone help?

0 Kudos
PeteCrosier
Occasional Contributor III

Experiencing this with 10.4.1 on Android too - we're rolling back to 10.4 as it breaks our workflows severely. We've logged it with Esri support and are waiting for a resolution.

0 Kudos