Select to view content in your preferred language

Join Features tool fails when joining related table with the main table

2613
8
Jump to solution
07-28-2022 09:39 AM
StephenKaranja
Regular Contributor

We have a feature layer for a Survey123 form that has a repeat. The feature layer has a main layer and a related table. We are trying to use the Join Features tool to perform a join on the main layer and the related table based on the uniquerowid field of the main layer and the parentrowid field of the related table. The tool fails with the message "JoinFeatures failed".

The ArcGIS Server Manager log shows the following message at SEVERE level:

Error executing tool. JoinFeatures Job ID: jfa8877272837406a809572136a7bcb54 : {"messageCode": "AO_100215", "message": "JoinFeatures failed."} Failed to execute (JoinFeatures).

The job's messages.xml at F:\arcgisserver\directories\arcgisjobs\system\spatialanalysistools_gpserver\jfa8877272837406a809572136a7bcb54\scratch\messages.xml contains the following error messages:

[100, 2557, 'ERROR 002557: Cannot delete field globalid from F:\\arcgisserver\\directories\\arcgisjobs\\system\\spatialanalysistools_gpserver\\jfa8877272837406a809572136a7bcb54\\scratch\\scratch.gdb\\targetLayer.']

[100, -2147467259, 'Failed to execute (DeleteField).']

I have also attached the messages.xml file.

We'd appreciate any suggestions on how to get the join features tool to work
successfully.

0 Kudos
1 Solution

Accepted Solutions
ElizabethLorenaRodriguez
Regular Contributor

Hello @StephenKaranja 

I think the error could be related with attachments enabled. Could you make a copy of the layer, disable the attachments, and try to make again the test ?

 

Best regards 

Lorena

View solution in original post

0 Kudos
8 Replies
ElizabethLorenaRodriguez
Regular Contributor

Hello @StephenKaranja 

 

I think this is related to the error: https://support.esri.com/en/technical-article/000010132

"If the index is managed by the Geodatabase, such as an index on the ObjectID field or an index added because of a relationship class, it cannot be deleted."

 

Are you working on ArcGIS Online or Portal? If Portal, what version?

 

Also, does the layer has attachments enable?

Best regards

Lorena

StephenKaranja
Regular Contributor

Thanks Lorena.

We are running Portal version 10.8.1. The main layer has attachments enabled.

Does the error mean there is no way to perform a join between the main layer and related table?

0 Kudos
ElizabethLorenaRodriguez
Regular Contributor

Hello @StephenKaranja 

I think the error could be related with attachments enabled. Could you make a copy of the layer, disable the attachments, and try to make again the test ?

 

Best regards 

Lorena

0 Kudos
StephenKaranja
Regular Contributor

Thanks for the suggestion.

I've made a copy of the layer but it doesn't have the option to disable attachments (see attached screenshot). The Join Features tool still fails. (I made the copy by opening the layer in map viewer, copying it, and then saving the copy.)

0 Kudos
ElizabethLorenaRodriguez
Regular Contributor

hi @StephenKaranja 

 

If you click on the layer, another section is going to be opened. There you can disable attachments

 

 

0 Kudos
StephenKaranja
Regular Contributor

Thanks @ElizabethLorenaRodriguez.

I think we're using a different version of Portal for ArcGIS. Clicking on the layer's name (survey) in the item page opens its page in the ArcGIS REST Services Directory. There is no option to disable attachments there. The link for disabling attachments is usually on the item page that I showed in the screenshot. Let me know if I'm missing something.

0 Kudos
StephenKaranja
Regular Contributor

I've realized the mistake I made. I created a copy of the layer that references the original layer, as described in this page: https://enterprise.arcgis.com/en/portal/10.8/use/copy-save-layers.htm

What I needed to do was to create an independent copy of the layer as described in this article: https://support.esri.com/en/technical-article/000024339

After that, I was able to run the Join Features tool successfully with attachments disabled.

Interestingly, I also enabled attachments on the copy and the join still ran successfully, although none of the records have any photo attachment.

Does this mean the tool was failing for the original layer because attachments are enabled and some of the records have photos attached?

Thanks a lot for your help @ElizabethLorenaRodriguez .

0 Kudos
ElizabethLorenaRodriguez
Regular Contributor

Hello @StephenKaranja 

 

Thank you for your confirmation. I believe It could be a BUG for that specific version. 

 

Fortunately now It works.

Best regards

Lorena

0 Kudos