Select to view content in your preferred language

arcgis pro 3 - model builder: spatial join - missing fields from join features field list

1417
4
08-28-2022 05:19 AM
Labels (2)
robertkalasek
New Contributor III

one of my nodes (within a model consisting of several nodes) is a "Spatial Join" - it depends on two different outputs of preceding nodes.

while extending the model step by step and running the added parts manually (by context menu run command) the node wich follows the "Spatial Join" returned an error message which was indicating that a required field was missing. i went through the whole sequence of nodes and identified the problem in the "Spatial Join" ... the fields list shows only a subset of the fields from my Join-Table -> a number of fields that actually exist in the Join-FC (i have re-checked that several times !) are dropped from the list and subsequently not part of the output FC ... and next node raises an error because the relevant field is missing.

did anybody come across that problem and has an idea about how to deal with it ?

0 Kudos
4 Replies
BarryNorthey
Occasional Contributor III

I have seen some confusion over using the Add Spatial Join (Data Management) and Spatial Join (Analysis) tools.

0 Kudos
robertkalasek
New Contributor III

my question reffers to Spatial Join (Analysis) ! ...

0 Kudos
ChristineParkerILSR
New Contributor II

@robertkalasek I'm running into this issue with a set of models I built earlier this year, but I'm using the 'Add Join' function. Each of these models worked perfectly for me prior to the Pro version 3 update. Have you found a resolution to this issue? 

- I have checked that the join fields are the same type, and even created a new field with identical field lengths (they were different, but again, these models worked previously).

- I tried using the 'Export Features' function directly after the 'Add Join'  and was able to see the join table fields in the Output Fields, but those fields were not available in the Filter drop-down menu. 

- I also tried removing all the (2) from the model elements and that made no difference either (see pics). 

So it seems like the join is working, but it isn't allowing me to query/filter on that joined dataset. 

I submitted a bug report but haven't heard anything yet. 

0 Kudos
CathyWilson2
Occasional Contributor

I'm adding my voice to the din. Right-click a layer in Contents and get "Add Spatial Join" which is the same as Add Spatial Join (Data Management Tools). It does not create a new layer. It appends a Join_Count field and the first of each of the other fields.
If you need it to create a new layer, use the "Spatial Join (Analysis)" tool. It gives you a new feature class with a Join_Count field and the first of the joined fields, BUT NO fields from the Target Feature.
I agree that this must be a bug. Why would Esri intentionally leave off the fields from the Target dataset?
I do understand why the Add Spatial Join option does not create a new FC. Sometimes you don't need a new layer, you just want to look a the data, maybe even symbolize based on it. But sometimes you DO want a new layer.

A workaround would be to run the Add Spatial Join, then export the result as a new feature class and use that in your models.

0 Kudos