Can't Create Features From A Feature Service

243
5
Jump to solution
10-20-2021 04:55 AM
Labels (2)
sgn_GSI
New Contributor II

I have a published feature service where only the Structure Junction layer somehow has the Support ApplyEdits With Global Ids property set to false.

sgn_GSI_0-1634730198112.png

I reviewed the attribute table and verified that it does have a GLOBALID field. When I attempt to create an electric pole-tower I get the following:

sgn_GSI_1-1634730796577.png

How do I ensure that applyEdits is set to true when publishing the feature service?

 

0 Kudos
1 Solution

Accepted Solutions
sgn_GSI
New Contributor II

The issue is that the relationship classes were built off a custom defined field instead of the GLOBALID field. When I included the standalone tables in the publish that were related to Structure Junction, the system would set the applyEdits value to false. All relationship classes needed to be rebuilt based off the GLOBALID field.

View solution in original post

0 Kudos
5 Replies
jcarlson
MVP Frequent Contributor

It does seem to be one of those properties that, if you didn't set it when you had a chance, you can't really access. But you say this property is on the specific layer? I have only ever seen it on the FeatureServer, not the layers.

I happened to have a throwaway layer that likewise had that property set to false, so I decided to use it for testing.

Initially:

Service Description: hatching test 2
Service ItemId: 0c5c1be4122b42fca2aa8706ecfa4356
Has Versioned Data: false
Max Record Count: 2000
Supported query Formats: JSON
Supports applyEdits with GlobalIds: False

 I went into the service's Settings and enabled Sync, as I know this setting can add GlobalID fields if they are not already present.

jcarlson_0-1634736798698.png

After:

Service Description: hatching test 2
Service ItemId: 0c5c1be4122b42fca2aa8706ecfa4356
Has Versioned Data: false
Max Record Count: 2000
Supported query Formats: JSON
Supports applyEdits with GlobalIds: True

 It worked! Why did it work? ¯\_(ツ)_/¯

Toggling that setting back to off does not change the applyEdits property to False, however. I would suggest toggling that setting off and on and see if it changes for you.

- Josh Carlson
Kendall County GIS
0 Kudos
sgn_GSI
New Contributor II

You are correct, the property is set by the system: https://support.esri.com/en/technical-article/000017731

I tried everything in that solution and also verified that I have unique index set up for the GLOBALID field.

sgn_GSI_2-1634738787885.png

I have only seen the option to enable sync when publishing the feature service. I haven't needed to enable that option for other feature services that I have published but I did give it a try. Unfortunately, the applyEdits property was still set to false only for the Structure Junction layer while all other layers had the property set to true.

I'm really confused as to what could be the issue. All other feature services I have published have not had this problem yet I published them all the same way.

 

0 Kudos
jcarlson
MVP Frequent Contributor

Curious. If the property is being set per-layer, can you try viewing the JSON in AGO Assisstant? Maybe you can force it to "true". Also, is this a hosted layer or a registered service?

- Josh Carlson
Kendall County GIS
0 Kudos
sgn_GSI
New Contributor II

I just reviewed the JSON and unfortunately I could not find any instances of that property. This is a hosted feature layer on my organization's portal.

0 Kudos
sgn_GSI
New Contributor II

The issue is that the relationship classes were built off a custom defined field instead of the GLOBALID field. When I included the standalone tables in the publish that were related to Structure Junction, the system would set the applyEdits value to false. All relationship classes needed to be rebuilt based off the GLOBALID field.

View solution in original post

0 Kudos