ArcMap 10.8
Hello, I'm having difficulty using the iterator in my model. This is what I want it to do:
Iterate through a list of SDE feature classes
For each SDE layer, make a temporary feature layer
Take that feature layer and perform a selection by location
Append the selected features into an existing geodatabase feature class.
So my model works perfectly except that the attributes are not being carried forward to my geodatabase feature class. The spatial data, in this case lines, comes over.
I know it's not an attribute compatibility issue as it works when done manually.
Not sure what I'm doing wrong... any suggestions would be appreciated.
Do your Schemas match? Seems like they probably don't and you have "NO_TEST" set on the append tool.
Thank-you for the suggestion.
I tried appending to a new layer which was built using the same schema as the input data set. Same result unfortunately. Strange thing is, I can copy and paste the features in ArcMap and the attributes come over.
Did you refresh the field mapping in the Append when you changed the input? I'd delete that append and recreate it just to be sure. What happens when you use merge in the model instead of append? If that copies all the fields across then it means the issue is definitely with how your append is set up.
Thank-you again.
Tried deleting and rebuilding the append process but had the same issue.
Merge was a non starter as the process wouldn't allow me to use a variable as an input.
What does seem to work (I need to test more extensively) is to copy the selected features to a temporary feature class in front of the append. When I append that layer, the attributes come over.
strange, but if it works. Just fyiu there is an in_memory workspace which may save you some clutter https://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/the-in-memory-workspace.htm
e.g. Copy Features output location -> in_memory/%Values%_CopiedSelection
Thanks for the tip. I'll try that.
Have you considered exporting the model to a python script?
I'm afraid I'm not a python programmer.