Validate, in ModelBuilder clears manual field mapping/matching

490
3
Jump to solution
04-26-2021 02:46 PM
Labels (1)
JasonGriffin
New Contributor II

I'm getting up to speed in ModelBuilder for Pro and I ran into an annoyance.  I had a feature class that needed to be appended into another feature class but the field names are not the same.  I added the field mappings and out of habit I click Validate Model after clearing intermediate data.  I believe the validate function is wiping out the field mappings.  If I avoid validating the model my manually matched fields stay matched, otherwise they are gone.  It took me a minute to catch why my data wasn't appending correctly.  Hopefully, this helps someone else.  Feels like a bug, but there could be something in the validation logic invalidating the manually matched fields because they are, cough, invalid?   ...name != name ?

0 Kudos
1 Solution

Accepted Solutions
Robert_LeClair
Esri Frequent Contributor

Thx for the reply - it seems this issue NIM047605 was something originally seen in ArcMap and fixed in the 10.0 release hence why it works fine in ArcMap.  It seems it's an issue in ArcGIS Pro.  I'd recommend contacting Esri Support Services and reporting this as a bug - thx!

View solution in original post

3 Replies
Robert_LeClair
Esri Frequent Contributor

Jason - by chance are you doing a Select before the Append geoprocessing tool in the Model?  Please advise.

0 Kudos
JasonGriffin
New Contributor II

JasonGriffin_3-1619616115227.png

 

 

Yes, however, the feature class is fixed/does not change schema.  I was testing out the row count tool as well.  In the past I would run two get counts (One at the onset, and the other after the selection) and then validate using a boolean value that the total feature count is greater than the selection from inside a Calculate Value tool (Best tool ever for doing python stuff mid-model).  Secondarily, I would precondition on the selection so if there were no selected records the tool would not continue.  It's a bit overkill, but it helps visualize the requirement. 

Now, that we have output count variables exposed I can do things a bit differently (It'll take some time to get a feel for the changes in Pro).  I ended up going back to desktop to nail this one down, but I have already migrated our locators and their nightly updates.

0 Kudos
Robert_LeClair
Esri Frequent Contributor

Thx for the reply - it seems this issue NIM047605 was something originally seen in ArcMap and fixed in the 10.0 release hence why it works fine in ArcMap.  It seems it's an issue in ArcGIS Pro.  I'd recommend contacting Esri Support Services and reporting this as a bug - thx!