I am trying to append features from an input layer to a target layer. Since Schema must match to append, I want to check if the input layer has the matching Field or not. It if does have the specific Field, I want it to run the append tool. However, if it doesn't, I want to add the specific Field, then then run the append tool. I added a snip of my model below. It contains other steps after the append to calculate fields, which is not relevant at this stage.
Thanks!
CamTurney_0-1737651774859.png
Solved! Go to Solution.
Add Field should fail to add a field that already exists and exit with a warning, so you can unconditionally add the field you need and then append, no need for a condition in the model
Hi @CamTurney,
You can easily accomplish this by changing the field mapping option to
RPGIS_0-1737652726310.png
This is the best method if the schemas are mostly identical and you want Pro to automatically sort the map out. If you want to set a custom map to ignore certain fields, map fields to a target with different names etc. then there might be issues if the input is missing the field.
Add Field should fail to add a field that already exists and exit with a warning, so you can unconditionally add the field you need and then append, no need for a condition in the model
This worked perfectly, thank you!