How to enable supportsApplyEditsWithGlobalIDs on your feature layer

37739
37
07-17-2018 09:06 AM
IsmaelChivite
Esri Notable Contributor
14 37 37.7K

[Published July 17, 2018]

[Updated July 21, 2018]

[Updated July 31, 2018]

[Updated October 8, 2018]

This blog post is for those of you that have upgraded the Survey123 field app to version 3.0 and realized that your surveys can no longer submit data to your feature layers. 

Here is a screenshot of the error that the Survey123 3.0 field app will show when working against a feature layer with no supportsApplyEditsWithGlobalIDs.

If your surveys do not show evidence that supportsApplyEditsWithGlobalIDsis a problem, then you should ignore this blog post.


A little bit of context

As described in our https://community.esri.com/groups/survey123/blog/2018/07/06/bull-release-30 announcement, the Survey123 3.0 field app no longer can submit data to feature layers where the supportsApplyEditsWithGlobalIDs property is set to false.  This is a somewhat obscure property that cannot be simply be turned on with the push of a button. Instead, it switches on automatically when your feature service meets a number of requirements:

  • All layers within the feature service must have an indexed GlobalID field.
  • All relationships (layer to layer, layer to table, layer to attachments, table to attachments) must use GlobalID fields (as opposed to ObjectID fields).
  • If using an enterprise geodatabase, the feature service cannot include versioned feature classes.
  • If using Portal for ArcGIS, only versions 10.4 and newer support this property.

The reason why Survey123 requires supportsApplyEditsWithGlobalIDs is that this setting is critical in order to guarantee clean transactions when uploading attachments (particularly when working in low bandwidth conditions) and also to support nested repeats.

We are aware that many of you have feature services where supportsApplyEditsWithGlobalIDs could not be enabled immediately, so we made available a backwards-compatibility build of Survey123 2.9 (also referred to as Survey123 Classic), which has been made available on Windows, Android and Mac.  Apple has not yet approved this build in the store so far, but in exceptional cases Esri could provide access to older builds as a temporary measure (Please contact Esri Tech Support for that).

To download Survey123 Classic (2.9), use the version switcher in the top-right corner of our Survey123 for ArcGIS | ArcGIS Download page.

Survey123 2.9 (Classic) is a temporary solution for all of you who can't really adjust to the requirements of version 3.0.  In this blog post I will describe a couple of approaches to enable supportsApplyEditsWithGlobalIDs in your feature layers so you can work with 3.0 against your existing layers.

Before embarking into these steps, consider if you really need your surveys to work against existing layers. In many cases, you can simply publish a new version of your survey with Survey123 Connect and have field users download your new survey.

If you want to keep Survey123 3.0 (and other previous versions) working against your existing layers, then read on...


How to check if supportsApplyEditsWithGlobalIDs is enabled in your feature layer

The supportsApplyEditsWithGlobalIDs property is not advertised through the user experience in ArcGIS Enterprise or ArcGIS Online .  This property is only visible within the json definition of your feature service.

  • In ArcGIS Online or your portal in ArcGIS Enterprise, navigate to the Page Details of your Form and click on the Form Layer to open the Feature Layer behind your Form.
  • Next, open the Services Directory view of your Feature Service and display it as JSON.
  • Look in the JSON for the supportsApplyEditsWithGlobalIDs

You cannot simply edit the supportsApplyEditsWithGlobalIDs property. This property only turns true when certain requirements in your Feature Service are met as described in this blog post.

Working with Hosted Feature Layers in ArcGIS Online and Enterprise

If your feature service does not have attachments or relationship classes: This is the easiest scenario. To enable supportsApplyEditsWithGlobalIDs, simply enable the sync capability in your feature service. This can be done through the Settings of the feature service.  From ArcGIS.com go into your Content, navigate to your survey folder and look for the Feature Layer (not the views!). Then open the Item Details page and go to Settings. The Enable Sync capability is inside the Feature Layer (hosted) section. Do not forget to hit Save after you check Sync.

Enabling the Sync capability will automatically create and index GlobalId fields in your feature layer and supportsApplyEditsWithGlobalIDs will switch to true. Once you have enabled sync, you can turn it off.  The Sync capability will not have a negative performance impact on your feature layer, but you will not be able to disable queries in your layer if Sync is enabled.  This is one of the main reasons why you may want to keep Sync disabled.

If your feature service has attachments and/or relationship classes: In this case, we need to overwrite your feature service with a geodatabse schema that includes one uniquely indexed GlobalID field per every layer and table in your service.Additionally, all attachment relationships must be based on GlobalID fields..  The following steps illustrate how to do this, without losing any data you may already have.

  1. In ArcGIS  or your portal in ArcGIS Enterprise, navigate to the Page Details of your Form and click on the Form Layer to open the Feature Layer behind your Form.
  2. Download your Feature Layer data in File Geodatabase format and add the entire contents of the File Geodatabase into ArcGIS Pro.
  3. In ArcGIS Pro, run the Add Global IDs geoprocessing tool on all layers and tables in your File Geodatabase.
  4. In ArcGIS Pro, run the Migrate Relationship Class geopocessing tool against attachment relationship classes in your File Geodatabase.
  5. In ArcGIS Pro, run the Disable Editor Tracking geoprocessing tool against your File Geodatabase data.
  6. In ArcGIS Pro, set all the Editor Tracking fields in your File Geodatabase to "Read Only" using the Design/Fields view as shown in the next animation.
  7. Overwrite your Form Feature service using the Share/Web Layer/Overwrite Web Layer option in ArcGIS Pro.
  8. In your portal in ArcGIS Online or ArcGIS Enterprise, Enable Editor Tracking (in the Setting Dialog of your feature service as shown in the next screenshot) in the Form's Feature Layer.

Make sure you enable Keep Track of who created and last updated features. Do not get confused with the Keep track of created and updated features.

Working with Non-Hosted Feature Layers in ArcGIS  Enterprise

For ArcGIS Enterprise, there are some situations where supportsApplyEditsWithGlobalIDs cannot be set to true in a Feature Service. This is the case, for example, when your Feature Service works on top of versioned data or tables not registered in a geodatabase. Installing Survey123 2.9 (Classic) would be the only solution possible unless you unversion your data or move your data into a non-versioned geodatabase feature layer.

Other than the exceptions above, here are steps to enable supportsApplyEditsWithGlobalIDs in ArcGIS Enterprise for non-hosted feature services:

  1. Add all layers and tables included in your Feature Service into an ArcGIS Pro session.
  2. In ArcGIS Pro, run the Add Global IDs geoprocessing tool on all layers and tables included in your Feature Service.  It is very important that the new GlobalID fields are indexed using a unique constraint.
  3. If your feature service includes attachments: In ArcGIS Pro, run the Migrate Relationship Class geopocessing tool against attachment relationship classes included in your Feature Service.
  4. Overwrite your existing feature service to ensure that added GlobalID fields are now exposed through your Feature Service, by making them visible.

If after doing all the above, you still cannot see that supportsApplyEditsWithGlobalIDs is enabled, then you can try the following:

  1. Overwrite your service definition ensuring this time that the sync capability is enabled.
  2. Enable archiving in your layers and overwrite your service definition.

Technically, Archiving and Sync are NOT required but they will ensure all your GlobalID fields are properly indexed.  Once supportsApplyEditsWithGlobalIDs has been switched to true, you should be able to disable archiving and sync if you like. 

Please note that while sync will not cause any performance degradation or overhead on your feature service, archiving might.  If sync is enabled, you will not be able to disable queries in your feature layer.
37 Comments
JustinO_Brien
New Contributor II

For this to work with ArcGIS Enterprise, would you also have to enable archiving on the feature class in the EGDB?

TL2
by
Occasional Contributor III

Will versioned feature classes in an Enterprise GDB ever be supported?

RyanUthoff
Occasional Contributor III

For a non-hosted feature layer in ArcGIS Enterprise, I met all of the criteria mentioned in this post, but it still wouldn't let me publish the survey. The only way I was able to publish the survey was after enabling archiving in the feature dataset the feature class is stored in.

SMauri
by
Occasional Contributor III

Hi Ismael, you mentioned a Python script in your blog...

...but where is it?

Cheers

Stefano

IsmaelChivite
Esri Notable Contributor

Hi Stefano. Sorry about that. The link to the Python script is now available in the blog post above. I just fixed the link.

RobBlash
Occasional Contributor III

Ismael Chivite and James Tedrick I built a survey from an existing table where supportsApplyEditsWithGlobalIds = false. I was able to initiate a workaround to make it true, however I still can't submit surveys against this table. I tried deleting the survey and re-publishing with Survey123 connect v 2.x, however I still can't submit a survey with Survey123 v3.0.132 (same error as before "Feature service requirements not met. supportsApplyEditsWithGlobalIds must be true"

Ay ideas?

IsmaelChivite
Esri Notable Contributor

Hi Rob, just make sure the feature layer used by your survey truly has the supportApplyEditsWithGlobalIds property set to true.  Once this property is set to true, Survey123 3.0 will be able to submit data to it.  I am not sure there are many workardounds to change this property, other than described above.

JordanMiller4
Occasional Contributor III

You would think for a Enterprise system that cost the most money, they would dedicate more time to building stuff that people actually need. We always have to change our workflows because Esri can't figure out how to include versioned layers. 

CesarPiovanetti1
New Contributor

Hi Survey123 team we are working on an azure sql database and we were able to fix the problem with enable archiving and turning Sync capability on. However submitting surveys through the inbox mechanism is now broken and we received and error "Unable to complete operation" and in my server manager i have "An error has occured". You have any workaround for that?

IsmaelChivite
Esri Notable Contributor

Cesar, please contact Esri Technical Support so an analyst can look in more detail to your data.  The Survey123 team will work with Tech Support to find a resolution to your problem.

RobBlash
Occasional Contributor III

Thanks Ismael. I've got it sorted now, and I'll explain in hopes that it may help someone else in the future. It turns out that my devices (both Android and iOS) were caching something which was causing the surveys to throw the error despite getting supportApplyEditsWithGlobalIds property set to true. Deleting and re-adding the surveys did not solve the issue. I had to uninstall the app, get rid of all S123 data on the devices, then re-download which wound up solving the issue.

Another note, my circumstance was unusual because despite having indexed GlobalIDs (as added by enabling sync)  I also had attachments enabled via an OID relationship. This is the way the feature services had been published, and the OID relationship was holding the parameter to false. Thankfully the existing attachments were not very important (there weren't many) so I was able to disable attachments on the feature service, which then set supportApplyEditsWithGlobalIds: true. Enabling attachments again (via the item settings) used GlobalIDs as expected and left the parameter at true.

Anish_Adhikari
Occasional Contributor

Hi Ismael,

Is Survey123 Classic for IOS going to be available soon? I cannot send my surveys once I upgraded to the new version. Since my feature service is based on a non geodatabase table, I cannot set supportApplyEditsWithGlobalIds property to true.

I stumbled upon this thread where there is a mention of 2.9 Beta version. Is there any way I can get access to that?

https://community.esri.com/message/783669-after-update-30-got-error-feature-service-requirements-not... 

I contacted Tech support and they said that the 2.9 Beta version mentioned on the thread and the to be released classic version for IOS is essentially the same so I need to wait for the official release.

by Anonymous User
Not applicable

Hi Anish,

We are able to make the 2.9 beta version available for iOS devices, however only for development and testing purposes. Please send me via private message for further details.

Phil.

Anish_Adhikari
Occasional Contributor

Hi Philip, yes that will work for me. I tried sending you a message but got this  error 

"You can only send messages to your Friends / Connections (people following you)."

Thanks

by Anonymous User
Not applicable

I just sent you a private message with details.

Phil.

Anish_Adhikari
Occasional Contributor

Hi Phil,

I replied to your private message with the information you requested. Looking forward to receive the invite for testflight.

-Anish                                                    

by Anonymous User
Not applicable

I have just replied.

erica_poisson
Occasional Contributor III

I've followed the same workflow as I had in the past for publishing a feature class with related table and GlobalID/GUID, and just saw this error for the first time. I've tried the workaround for HOSTED feature services with relationship classes/attachments; it took me a bit to realize I needed to update the attachment relationships as well (oops).

I do have a few questions though:

Also, will this now affect already existing surveys that had previously functioned fine if Survey123 3.0 is downloaded? Is this something that will be easier to deal with in the future/will this be fixed so this work around doesn't need to be used?

Also, is there a way to go in via REST/admin to change the 'false' to 'true'?

by Anonymous User
Not applicable

Hi Erica,

Yes, if you download and use version 3.0 or higher (any future releases) you will need to ensure your feature services support this capability. This will not be "fixed" in a future release, as this capability is now a requirement of Survey123 3.0 and higher.

Phil.

erica_poisson
Occasional Contributor III

Will the option to update this ever be exposed via the REST 'update definition' page?

by Anonymous User
Not applicable

Hi Erica,

As detailed in the blog post, it is not as simple and enabling a single setting. Depending on if data has been already collected and the other settings enabled on the feature service, several steps need to be carefully followed to avoid data loss. Therefore a single option to enable via REST 'update definition' page may not meet all users requirements and could have unintended consequences. Hence the content of this blog.

Phil.

BrettShaver
Occasional Contributor

Thank you for the detailed explanation - definitely helpful and thorough.  However, this should not be that difficult and require this much effort to do.  I am kind of disappointed how difficult it is to link a hosted feature service to Survey 123 already and this is yet another annoying hurdle.  

Grant-S-Carroll
Esri Contributor

Hi Phillip

Are there any details on when the iOS classic version will be available at full release? I have a client with a large workforce who have been severely impacted by this. 

Thanks

LouisDECOMBE
Occasional Contributor

Hi, 

 

I have an issue to share analyst resulta of my survey. I can not share the analyst with a group on my suvey. i dont understand why.

We use AGS not federated and AGOL, so i did respect your process (IDglobal, Archiving, etc.) Every thing works well (collecte, update from survey 123) but I can not share result with a group.

 

My FC and my relation table have editor tracking.

 

If you have any explanation of the error message that can help me, it can be very good.

 

Thank you very much

 

Regard

Louis

deleted-user-gdY-GmN0uDXr
New Contributor II

Thanks for all your Survey123 Geonet articles - they have been helpful. I wondered if you are certain that this statement made in the article is true: "Once supportsApplyEditsWithGloablIDs has been switched to true, you should be able to disable archiving and sync if you like. ". I disabled archiving once the survey was successfully published on top of a feature service (with supportsApplyEditsWithGlobalIDs: True). Now the user can not submit a survey and the error is "undefined: supportsApplyEditsWithGlobalIds is false for layer ....". This makes me think you can not disable archiving later? We need to be able to disable archiving because archiving messes up a database view that is essential in our workflow.

JamesTedrick
Esri Esteemed Contributor

Hi Grant,

We are not able to list Survey123 Connect on the iOS app store.  As an alternative, you can use AppStudio to create a version of Survey123 based on the 2.8 template to preserve functionality and run within AppStudio Player.

BrysonKoziell
New Contributor III

There is only one template available in App Studio.  How do we know what release of Survey123 that template was built off of?

JamesTedrick
Esri Esteemed Contributor

Hi Bryson,

The description of template identifies which version of Survey123 the template was built from.

CraigShephard2
New Contributor III

Thanks, just completed the upgrade as per Ismael Chivite steps above of a feature service layer that's been in use (AGOL) since September 2015. Final tip... had to refresh/download the form to my device. Awesome.

ChrisGoessl
New Contributor III

I would like an answer to this question also. Our entire system works on versioning due to so many people and or departments could be editing the information at the same time. 

If so, when will this be available. Hopefully soon!

JohnathanHasthorpe
Esri Regular Contributor

Hi Lynne

You should be able to disable archiving without any issue. It is only used to create the unique index required for the supportsApplyEditsWithGloablIDs capability. The error message seems to indicate that the capability was not successfully enabled. Could you share a screenshot of your service capabilities - or even better, is the service publically accessible so I can take a look?

Thanks

John

 

TaylorRobin1
New Contributor II

I am running into a similar problem. I have to stop the service to disable archiving on the feature class because the service created a lock on it. Once I restart the service, I can no longer use my survey with that feature service which makes me think the feature service switched supportsApplyEditsWithGloablIDs  back to false. Is there a way to disable archiving without stopping the service?

FilipePinhati
New Contributor

Helpful tutorial

EllenSkerke
New Contributor

Any idea how I can migrate a relationship class that currently uses a unique id, but not the objectID, to use the globalID?  I have an existing feature class with a relationship based on a 'Manhole ID'.

ScottLehto1
New Contributor II

Hi Ellen, I am curious as to what you were able to figure out. I have the same hurdle to cross.

CambridgeGIS
New Contributor

Hello! Working with sensitive data that needs to be wiped out after 24 hrs. I have disabled archiving and the survey works fine for a while until it decides it won't anymore and throw an error saying you cannot submit because you are not the creator or the owner. Re-enabled archiving, published, disabled archiving solved the issue. However, this is a big disruption for the users. Has anyone else seen this issue or has any idea what may cause it? Thanks!

AlejandroVillarrealGomez
New Contributor

Hola amigos de la comunidad. Por favor necesito ayuda con este problema.

Me suscrito como desarrollador en Argis, y ello me ha permitido crear un diseño de encuesta en survey123, la cual al momento de compartir o colaborar con todo publico, no guarda y aparece mensaje de error. Pero sin embargo, logro compartir la encuesta y aparece otro mensaje que no se pueden enviar encuestas.

>Como corregir este error.

Anexo imagenes

Nota: he seguido todos los pasos de soporteApplyEditsWithGloablIDs  true   pero nada sigue el error.

correo: avillarrealg@unicartagena.edu.co

error al guardar encuesta para compartir.jpgmensaje de la encuesta compartida de no aceptar envios.jpg