<?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 Re: Field name in-line variable substitution in ModelBuilder SQL query in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/field-name-in-line-variable-substitution-in/m-p/189977#M6503</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How did you do it? We are trying to figure out the same thing, but are so new to python that we dont even know how to start. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are trying to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bring in a table and feature class and join them (easily done, not in question)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then calculate attributes in the feature class based on values in the joined table (mostly easily done). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BUT I want to allow for error on join table field names. So I would like to have them identify each field as parameterized values up front, then use inline variable subsitution in the calculation arguments to specify those fields. I would like for the field varable prompts to provide a list of fields from the joined table to choose from. Thats the part I 'm having trouble with. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ellen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jan 2013 15:40:16 GMT</pubDate>
    <dc:creator>EllenTejan</dc:creator>
    <dc:date>2013-01-09T15:40:16Z</dc:date>
    <item>
      <title>Field name in-line variable substitution in ModelBuilder SQL query</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-name-in-line-variable-substitution-in/m-p/189975#M6501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've created a multivalue list of table field names by calling a python script in ModelBuilder. I'd like to iterate through the list of field names and create SQL queries for the "Select Layer by Attribute" tool. I'd also like to use the field name as an in-line variable in the query. I know how to use a value variable when constructing an SQL query (ex. "FIELDNAME" = '%variable%') but not with a field name. Is it possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Paul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 16:48:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-name-in-line-variable-substitution-in/m-p/189975#M6501</guid>
      <dc:creator>PaulFiner</dc:creator>
      <dc:date>2012-11-16T16:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Field name in-line variable substitution in ModelBuilder SQL query</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-name-in-line-variable-substitution-in/m-p/189976#M6502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is it possible?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sure is. Two ideas to help you along:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Use the Iterate Value tool to iterate the multivalue&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Use Calculate Value to create the SQL expression as a string and set its output as type "SQL Expression"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Nov 2012 00:51:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-name-in-line-variable-substitution-in/m-p/189976#M6502</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-11-17T00:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Field name in-line variable substitution in ModelBuilder SQL query</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-name-in-line-variable-substitution-in/m-p/189977#M6503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How did you do it? We are trying to figure out the same thing, but are so new to python that we dont even know how to start. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are trying to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bring in a table and feature class and join them (easily done, not in question)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then calculate attributes in the feature class based on values in the joined table (mostly easily done). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BUT I want to allow for error on join table field names. So I would like to have them identify each field as parameterized values up front, then use inline variable subsitution in the calculation arguments to specify those fields. I would like for the field varable prompts to provide a list of fields from the joined table to choose from. Thats the part I 'm having trouble with. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ellen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2013 15:40:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-name-in-line-variable-substitution-in/m-p/189977#M6503</guid>
      <dc:creator>EllenTejan</dc:creator>
      <dc:date>2013-01-09T15:40:16Z</dc:date>
    </item>
  </channel>
</rss>

