Select to view content in your preferred language

Use a field value to dynamically name output feature class

1302
2
09-15-2022 02:34 PM
by Anonymous User
Not applicable

Hello,

I am wondering if it is possible in model builder to incorporate a field value when using the feature class to feature class tool.

The user inputs a parameter earlier in the model (a year) which is stored in the [survey_year] field. I woud like that value to be incorporated into the output feature class name e.g.

SurveyResults[survey_year]

I tried the get field model only tool but it said invalid field name. I thought this may be due to the year being an integer so I added another field of type text to copy the year value but just the same.

 

Any help wouldl be appreciated.

 

Thanks

2 Replies
by Anonymous User
Not applicable

I would suggest reading up on the following: Inline variable substitution—ArcGIS Pro | Documentation

I'm a bit rusty but believe that you should be able to create a parameter from their input value (year) and add this value to the end of the output name. Something like SurveyResults%Year%

SHartholt_0-1671041390444.png

 

0 Kudos
GabrielScarcella
Occasional Contributor

Take a look at the following article: Export layers with a current date in the output layer name in ModelBuilder

With a slight modification to the proposed expression, you should achieve what you need.

0 Kudos