I'm trying to create an interface that enables a user to browse to a file with spatial objects, select the file, select the objects on the map, and then create a buffer around the selected objects. The problem that I'm running into is that the map tool seems to just have a Label and SpatialObject field as the two default output fields. The file that I select has a spatial field named "Centroid" and not "SpatialObject". So I'm getting an error message that the "SpatialObject" field is missing for the Buffer tool because the spatial field is named "Centroid" in the file that I selected. How would I account for variations in field names and how could I determine if certain field names exist so I can use them later on in the workflow? For example, say I want to use fields named ID, Name, Address, etc. down the stream for a report or data summary. Can I use those or am I only restricted to Label and SpatialObject. Thanks
Solved! Go to Solution.
Hi @sewhee1
Assuming your custom maps still only return one spatial field, you can use this technique leveraging the Dynamic Select and Dynamic Rename tools
The top Dynamic Select select only the Spatial fields and the Dynamic Rename changes the field name of the selected field to SpatialObj. The bottom Dynamic Select passes through all the other fields. The join joins the two sets of fields on record position, since neither of the Dynamic tools changes the record ordering.
BTW. thanks for submitting a brand new(for me, anyway) type of question that I had to think about.
Dan
Thank you danilang!