How to use in-line variable substitution from field attribution for input name of output FC?

3132
3
12-18-2015 09:40 AM
AndyAston
New Contributor III

I'm new to advanced techniques in ModelBuilder.  I'm not successful with Help in this area (and running out of ideas) and request support from the GIS community.  Here's my central need: what's the feasibility of using in-line variable substitution to dynamically pull field attribution as a name input for a model's FC output?  I'm running ArcGIS for Desktop (v10.3.1)/ArcGIS Pro (v 1.1.1) Basic only.

Here's the overall problem/need:  I need to automate the pre-processing of thousands of parcel datasets.  There are parcel boundary polygons (attribution contains unique IDs only) and parcel centroid points (attribution contains unique IDs and ownership) that need joined and exported to a new feature class (this staged data will be used later as input into other suitability modeling). Each input FC name contains a unique FIPS code (1 polygon with 1 matching point) used to perform the join.  First, an iterator (containing a second nested iterator) in my model cycles through each unique polygon and point pair to perform a tabular join and output the FC.  Conceptually, I hope to find a way for the output name to be more meaningful (i.e. the true county and state name represented by the FIPS code).  For example, "Parcels_06061" = "PlacerCountyCA".  The last piece of the puzzle is the FIPS "lookup" is a stand-alone table, it's not contained in the parcel polygons or points, but can be joined by FIPS code.  This table contains three fields: FIPS, county name and state name.  See attached screenshot for a representative visual.

If it's doable (directly or indirectly) in ModelBuilder (or Python), please offer some ideas and guidance.  Thanks in advance for your feedback.  Have a great day and holidays!

0 Kudos
3 Replies
DarrenWiens2
MVP Honored Contributor

I'm not exactly sure where you're at with this, but are you aware of the Get Field Value tool? If you have a dataset with the FIPS code in the first row, you can collect it and use as an in-line variable for your output FC name.

AndyAston
New Contributor III

Thank you.  I'll look into the Get Field Value more in-depth.  Will this work on a joined table?

0 Kudos
AndyAston
New Contributor III

HiDarren Wiens​,​ I got my model functioning a majority of the way, but it outputs NULL attribute values in each feature class after the first iteration.  Only the first feature class' run is truly successful.  I feel the reason is that there are multiple tabular joins.  The issue is I can't get the Remove Join tool to successfully work...when run in the main model or a nested model.  I get Error 000229 on both.  I'm in need some more guidance/feedback.  Please let me know if something stands out to you.  See the attached graphics for a visual representation of the model (and the 3 sub-models).  I'm happy to share the model(s) and datasets if needed.  Thanks a million and have a great day!  1- Pre-Processing Parcel Staging.png

Main model

1a - Pre-Processing Parcel Point Iterator.png

Parcel Point Iterator sub-model

1b - Pre-Processing FIPS Lookup.png

FIPS Lookup sub-model

1c - Pre-Processing Parcel Join Poly-Points and Calc.png

Parcel Join Poly-Points and Calc sub-model

Error 000229 Cannot open <value>.tiff

Error 000229

0 Kudos