<?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 Variable Integration with Extract by Attributes in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024697#M11141</link>
    <description>&lt;P&gt;Hi Everyone Quick Question,&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;I am trying to build a model in model builder that ask for a user to define a value in a parameter (string variable) and then integrate this string variable into my raster's extract by attribute tool (spatial analyst). Basically I want a user to be able to enter say "3.2" which is related to a string variable and then utilize this string variable in the where statement of the extract by attribute tool.&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;Where value &amp;lt;= (User define value in string variable)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;The problem I have is I don't know how to integrate the separate string variable into the sql where clause.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AustinGootee_0-1612829181703.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/5575iB5F14B643BC6641C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AustinGootee_0-1612829181703.png" alt="AustinGootee_0-1612829181703.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2021 00:08:07 GMT</pubDate>
    <dc:creator>AustinGootee</dc:creator>
    <dc:date>2021-02-09T00:08:07Z</dc:date>
    <item>
      <title>Variable Integration with Extract by Attributes</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024697#M11141</link>
      <description>&lt;P&gt;Hi Everyone Quick Question,&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;I am trying to build a model in model builder that ask for a user to define a value in a parameter (string variable) and then integrate this string variable into my raster's extract by attribute tool (spatial analyst). Basically I want a user to be able to enter say "3.2" which is related to a string variable and then utilize this string variable in the where statement of the extract by attribute tool.&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;Where value &amp;lt;= (User define value in string variable)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;The problem I have is I don't know how to integrate the separate string variable into the sql where clause.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AustinGootee_0-1612829181703.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/5575iB5F14B643BC6641C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AustinGootee_0-1612829181703.png" alt="AustinGootee_0-1612829181703.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 00:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024697#M11141</guid>
      <dc:creator>AustinGootee</dc:creator>
      <dc:date>2021-02-09T00:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Integration with Extract by Attributes</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024699#M11142</link>
      <description>&lt;P&gt;Hi Austin,&lt;/P&gt;&lt;P&gt;This should hopefully help out.&lt;/P&gt;&lt;P&gt;Your SQL query should formatted like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'"FieldName"&amp;nbsp;=&amp;nbsp;\'{0}\''&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;.format(Critical_Value)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 00:20:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024699#M11142</guid>
      <dc:creator>DavinWalker2</dc:creator>
      <dc:date>2021-02-09T00:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Integration with Extract by Attributes</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024713#M11143</link>
      <description>&lt;P&gt;I apologize, I am new to this whole sql coding, python is where my expertise lie, but i am trying to build my model out in model builder for other coworkers who are less skilled in python. I am still running into some errors and I think it's just because I am having a hard time wrapping my head around the coding.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AustinGootee_0-1612833814456.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/5578i0A8206C6761E49D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AustinGootee_0-1612833814456.png" alt="AustinGootee_0-1612833814456.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 01:25:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024713#M11143</guid>
      <dc:creator>AustinGootee</dc:creator>
      <dc:date>2021-02-09T01:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Integration with Extract by Attributes</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024729#M11144</link>
      <description>&lt;P&gt;Sorry I didn't explain it well enough. The FieldName represents the field you are doing the WHERE clause against. In your case it's VALUE&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'"VALUE"&amp;nbsp;=&amp;nbsp;\'{0}\''&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;.format(NOAA_IH_Year_1_Crit_Value)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 02:16:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024729#M11144</guid>
      <dc:creator>DavinWalker2</dc:creator>
      <dc:date>2021-02-09T02:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Integration with Extract by Attributes</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024837#M11146</link>
      <description>&lt;P&gt;Are you familiar using inline variable substitution in ModelBuilder?&amp;nbsp;&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/inline-variable-substitution.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/inline-variable-substitution.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I made a quick mock-up based on your screenshot and this works fine.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KoryKramer_0-1612876527088.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/5592iDBA4CCA58633577B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KoryKramer_0-1612876527088.png" alt="KoryKramer_0-1612876527088.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note, though, that my Critical Value variable is a Float, not a String.&amp;nbsp; Why do you need the variable to be a String when ultimately it has to be a number in order to compare against a numerical value in the raster?&amp;nbsp; The users would be expected to enter a number for that parameter, correct?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 13:17:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024837#M11146</guid>
      <dc:creator>KoryKramer</dc:creator>
      <dc:date>2021-02-09T13:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Integration with Extract by Attributes</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024945#M11147</link>
      <description>&lt;P&gt;I am, I had wanted to use inline variable substitution but was unsure if it would work with the SQL coding. The reason I had used a string was simply because I couldn't find a number/float variable type in the model builder options and figured that I could just as easily utilize a float() function to transform the string into a float.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 17:05:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/variable-integration-with-extract-by-attributes/m-p/1024945#M11147</guid>
      <dc:creator>AustinGootee</dc:creator>
      <dc:date>2021-02-09T17:05:53Z</dc:date>
    </item>
  </channel>
</rss>

