<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Arcgis 10.1 modelbuilder - defining a field name in a expression to be a parameter in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438789#M14729</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was asked if the following can be done in the modelBuilder (I know it's simple in python, but I was asked specifically on the modelBuilder):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The user has a expression in the model:&amp;nbsp;&amp;nbsp; str(!city_code_int!).zfill(4)&amp;nbsp; (the "city_code_int" is the field name of an "long"-type field).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;he wants to put only the field name "city_code_int" as a parameter in the model (and not the entire expression).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to do such a thing in the 10.1 Model Builder?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in Advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Apr 2013 05:04:56 GMT</pubDate>
    <dc:creator>yonatanrubinstein</dc:creator>
    <dc:date>2013-04-04T05:04:56Z</dc:date>
    <item>
      <title>Arcgis 10.1 modelbuilder - defining a field name in a expression to be a parameter</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438789#M14729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was asked if the following can be done in the modelBuilder (I know it's simple in python, but I was asked specifically on the modelBuilder):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The user has a expression in the model:&amp;nbsp;&amp;nbsp; str(!city_code_int!).zfill(4)&amp;nbsp; (the "city_code_int" is the field name of an "long"-type field).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;he wants to put only the field name "city_code_int" as a parameter in the model (and not the entire expression).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to do such a thing in the 10.1 Model Builder?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in Advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 05:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438789#M14729</guid>
      <dc:creator>yonatanrubinstein</dc:creator>
      <dc:date>2013-04-04T05:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438790#M14730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I understand what you're looking to do, and if I do understand correctly I think you want to use inline variable substitution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you want the model to allow a user defined input which is an attribute from the field&amp;nbsp; "city_code_int".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this example let's say we have a landowner dataset and we want to create a model which simply updates a field called 'County'; the user only has to input the county name as a string value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In MB create a variable: Insert&amp;gt;Create Variable&amp;nbsp; and choose string as the type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rename the variable 'County Name' and expose it as a model parameter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the calculate field tool, reference the variable using inline substitution: '%County Name%' (note that I've included single quotes to satisfy the field calculation. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a quick example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]23197[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When the model is executed, all the user has to input is the string value of the county name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope that answers your question, and if not sorry if I missed the point.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 11:26:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438790#M14730</guid>
      <dc:creator>ZacharyHart</dc:creator>
      <dc:date>2013-04-04T11:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438791#M14731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;See "Example 3" in this help topic: &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Examples_of_inline_model_variable_substitution/002w0000005w000000/"&gt;Examples of inline model variable substitution&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; There are other useful examples in this topic as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 15:48:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438791#M14731</guid>
      <dc:creator>DaleHoneycutt</dc:creator>
      <dc:date>2013-04-04T15:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438792#M14732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Zachary, Hi Dale,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for answering. I did what both of you suggested, problem is that what I want is a more complex case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I mean that when I put in the expression a single field without manipulations, it works good ( such as the case in what dale did, and example 3 in the help). But when I put in the expression a field with manipulations (such as str or zfill), the "simple user" running the model from the toolbox can change the full expression but not (as I would have wanted it) the field name only. If only there would be a modelbuilder tool that would let me take apart the expression, maybe I could have feeded the fieldname as a parameter for the expression.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 07:38:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438792#M14732</guid>
      <dc:creator>yonatanrubinstein</dc:creator>
      <dc:date>2013-04-05T07:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438793#M14733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Zachary, Hi Dale,&lt;BR /&gt;&lt;BR /&gt;Thanks for answering. I did what both of you suggested, problem is that what I want is a more complex case.&lt;BR /&gt;&lt;BR /&gt;I mean that when I put in the expression a single field without manipulations, it works good ( such as the case in what dale did, and example 3 in the help). But when I put in the expression a field with manipulations (such as str or zfill), the "simple user" running the model from the toolbox can change the full expression but not (as I would have wanted it) the field name only. If only there would be a modelbuilder tool that would let me take apart the expression, maybe I could have feeded the fieldname as a parameter for the expression.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've looked at your example, you need to be exposing the variable as a parameter, not the whole expression. Can you please try to create a variable as I suggested? Insert the variable and call it (rename it) 'Field Name'; and expose it as a model parameter.&amp;nbsp;&amp;nbsp; Then in your expression, reference that as %Field Name%.&amp;nbsp;&amp;nbsp; Since you would presumably have a limited number of fields to choose from, we could then create a list so the user get's the name right every time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To reiterate: if you expose your entire expression as a parameter, the user will be able to mess with it when the model is run.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]23232[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[Note: if there will always be the same input to your model; you don't need to expose that as a parameter either, just hardwire it in]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: Ok looked at this once again. I forgot that with the calculate field tool you can create a variable from the field name itself. I'm pretty sure that this will work right here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]23251[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ignore the thumbnail below.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 10:23:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438793#M14733</guid>
      <dc:creator>ZacharyHart</dc:creator>
      <dc:date>2013-04-05T10:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438794#M14734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Zachary,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried doing as you suggested in the end, but as the data is taken from one field, calculated and inserted into another field, I can't use one "field name".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried playing with the "calculate value" tool and feeding the results into the "calculate field" as an expression(see jpg attached), and it looked promising, only the "calculate value" tool doesn't recognize the fields within the input table.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Apr 2013 20:46:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438794#M14734</guid>
      <dc:creator>yonatanrubinstein</dc:creator>
      <dc:date>2013-04-06T20:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438795#M14735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In your 'field to be updated' parameter, are you also specifying %Field Name% ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 11:10:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438795#M14735</guid>
      <dc:creator>ZacharyHart</dc:creator>
      <dc:date>2013-04-08T11:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438796#M14736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No. I think I tried it, but I ruled it out, as The "field to be updated" is a different field than the one I'm calculating from (%Field Name%), on which data I'm doing manipulations.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 13:46:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438796#M14736</guid>
      <dc:creator>yonatanrubinstein</dc:creator>
      <dc:date>2013-04-08T13:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438797#M14737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Now i'm confused. I thought the point was to have the user enter in a field that they wanted a predefined expression to be applied to?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 15:11:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438797#M14737</guid>
      <dc:creator>ZacharyHart</dc:creator>
      <dc:date>2013-04-09T15:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438798#M14738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Now I'm confused. I thought the point was to have the user enter in a field that they wanted a predefined expression to be applied to?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry. The point was to have the enter a field that they wanted a predefined expression to be applied to, &lt;/SPAN&gt;&lt;STRONG style="color: &amp;quot;#FF0000&amp;quot;;"&gt;But &lt;/STRONG&gt;&lt;SPAN&gt;the output is to be written to a &lt;/SPAN&gt;&lt;STRONG style="color: &amp;quot;#FF0000&amp;quot;;"&gt;different field&lt;/STRONG&gt;&lt;SPAN&gt; (which the user enters as well), and &lt;/SPAN&gt;&lt;STRONG style="color: &amp;quot;#FF0000&amp;quot;;"&gt;not &lt;/STRONG&gt;&lt;SPAN&gt;the original field.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Apr 2013 06:04:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438798#M14738</guid>
      <dc:creator>yonatanrubinstein</dc:creator>
      <dc:date>2013-04-14T06:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438799#M14739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you get this solved? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what I'm hearing then is that we need to have 2 parameters exposed, correct?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 11:51:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438799#M14739</guid>
      <dc:creator>ZacharyHart</dc:creator>
      <dc:date>2013-04-18T11:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis 10.1 modelbuilder - defining a field name in a expression to be a paramete</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438800#M14740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Did you get this solved? &lt;BR /&gt;&lt;BR /&gt;So what I'm hearing then is that we need to have 2 parameters exposed, correct?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't succeed to solve this, no, so any help will be much appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;yes, 2 parameters need to be exposed - one of them is supposed to be fed into a otherwise constant expression.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 13:11:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-10-1-modelbuilder-defining-a-field-name-in/m-p/438800#M14740</guid>
      <dc:creator>yonatanrubinstein</dc:creator>
      <dc:date>2013-04-18T13:11:31Z</dc:date>
    </item>
  </channel>
</rss>

