I am using ArcGIS Pro 2.7.1

My workflow involves ingesting data from various jurisdictions, populating several of the fields and then appending it to a master dataset. I wanted to create a tool simplify the manual part of this task. The tool in ModelBuilder involves a series of spatial joins, joining back to the primary dataset, and field calculations. All input data is the same format (two of the parameters are the same datasets, and the county parcel and soon-to-be-ingested data are all the same structure).

enter image description here

I used sample data form one jurisdiction to build the model. When run as a tool it works flawlessly. However, when I attempt to run it on a different jurisdiction's data it has trouble. The issue seems to lie in the way the join fields are specified. For instance, the dataset I used to put the model together was for Santa Clara County. So when I join and go to calculate a field I specify SantaClara_Work.SRA as the target field.

When I go to use this on a different jurisdiction it instead creates new fields named after the original test dataset. For instance, I tried to use the tool for Kern County and get these messages, and none of the desired field populate:

enter image description here

How do I circumvent this issue and make the tool generic, so I can specify the new jurisdictional data and the relevant county and have it populate appropriately?

  • I've hit that problem many times when joining data, the field mapping retains the table name of the table you built the model from and as soon as you apply it to another featureclass the model bombs out on the joining step. In all the years I have used model builder I have never satisfactorily resolved this issue. I typically end up scripting the logic in python where you have fine control of the parameters and are not reliant on modelbuilder controlling internal validation. So my advice is script it in python.
    – Hornbydd
    Jul 8, 2021 at 22:28
  • @Hornbydd I will try that. I am a bit of a python novice so I thought for a first attempt I would try to make the thing in ModelBuilder and then export the python from it and learn from there. The other thing that I'm attempting (but still having trouble with) is renaming the incoming dataset to something more generic and then renaming it back, so that the field map will always be something like NewTempData.SRA and then will be reverted. Probably not the cleanest but I am going to try that first.
    – TravisB
    Jul 12, 2021 at 18:02


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.