I made a model with which I would like to process various shapefiles that have different fields. I built it using a test shapefile that had its own fields.
When I try running another shapefile through it, I get wrong field mappings. Is there a way to set my field mappings as a variable so that the output fields in the final table are dependent on the input shapefile?
I have heard of inline variable substitution but I do not know how to/am having a hard time to use it. Any specific example would be most welcome.
My issue more specifically is to make sure that when performing a spatial join, the fields of the actual input feature class are the ones being used, and not the ones that were in the test feature class. I have tried substituting the name of the target feature layer in my Spatial Join with a variable (%Sites_Location%) but that crashes Arcmap I do not know why. Do Spatial Joins not accept variables as target? What am I missing?