Greetings, All,
I have a basic model constructed to make a selection, add a spatial join, calculate 4 fields in the target feature's attribute table, and finish with remove spatial join. I then make another selection and repeat. Each time beyond the first that a spatial join is added in an ArcGIS Pro session, the field name of the joined dataset gets a numeral added to the end of the field name. This number is increased by 1 each time a spatial join is added after it is removed from the previous model run. For example, the joined dataset's field name is 'SMA_Add_Spatial_Join.Property_Status' on the first join. Once the join is removed and then added back an , a numeral '_1' will be added as a suffix following 'Join' in the fieldname, so it becomes ''SMA_Add_Spatial_Join_1.Property_Status.' If I were to remove and add the spatial join another time, that number would increase to 2, and so on.
My question is, is there a way to automate updating this number in the field name with the spatial join to avoid having to open the 'Calculate Field' tool in model builder and manually change (i.e. increase by 1) said number prior to each run. Or is there a workaround to this that I'm not considering?
Thanks for your consideration,
Andy
I think this will do the trick: https://community.esri.com/t5/arcgis-pro-blog/creating-dynamic-field-maps-for-tools-in-model/bc-p/16...
At least mine exactly similar case was solved with this. Another perspective is that things got much easier with ArcGIS Pro 3.7 so keep your ArcGIS Pro updated when working with Model Builder - it seems to be clearly evolving between versions.
Excellent--I'll investigate that. Thank you. I look forward to our organization upgrading to 3.7.