<?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 Select by Attribute using variable in Model Builder in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1242194#M63548</link>
    <description>&lt;P&gt;I'm very new at Model Builder and am trying to make a tool that selects features by attribute, with an input variable as part of the SQL query.&lt;/P&gt;&lt;P&gt;I have used the SQL expression MOD(Elevation,10)=0, for instance to only display elevation contour lines every 10 units out of a dataset that has a more dense spacing (say 1 unit). This works great when using the Select by Attribute tool and setting a definition query, but in this case, I need an input parameter in my model instead of a hard-coded 10 units.&lt;/P&gt;&lt;P&gt;Here is an example of what I'm trying to do:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavidDurst_0-1671234503583.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58817i35E34536AFF3CDED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DavidDurst_0-1671234503583.png" alt="DavidDurst_0-1671234503583.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I draw my line from Supplementary Interval to Select Layer by Attribute, the entire model after Input Feature Class gets greyed out:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavidDurst_1-1671234592118.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58818iF3B94DCB2787F3E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DavidDurst_1-1671234592118.png" alt="DavidDurst_1-1671234592118.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can I specify the second integer parameter of the MOD() function so that I can do my selections? Any help would be appreciated.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2022 23:54:50 GMT</pubDate>
    <dc:creator>DavidDurst</dc:creator>
    <dc:date>2022-12-16T23:54:50Z</dc:date>
    <item>
      <title>Select by Attribute using variable in Model Builder</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1242194#M63548</link>
      <description>&lt;P&gt;I'm very new at Model Builder and am trying to make a tool that selects features by attribute, with an input variable as part of the SQL query.&lt;/P&gt;&lt;P&gt;I have used the SQL expression MOD(Elevation,10)=0, for instance to only display elevation contour lines every 10 units out of a dataset that has a more dense spacing (say 1 unit). This works great when using the Select by Attribute tool and setting a definition query, but in this case, I need an input parameter in my model instead of a hard-coded 10 units.&lt;/P&gt;&lt;P&gt;Here is an example of what I'm trying to do:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavidDurst_0-1671234503583.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58817i35E34536AFF3CDED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DavidDurst_0-1671234503583.png" alt="DavidDurst_0-1671234503583.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I draw my line from Supplementary Interval to Select Layer by Attribute, the entire model after Input Feature Class gets greyed out:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavidDurst_1-1671234592118.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58818iF3B94DCB2787F3E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DavidDurst_1-1671234592118.png" alt="DavidDurst_1-1671234592118.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can I specify the second integer parameter of the MOD() function so that I can do my selections? Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 23:54:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1242194#M63548</guid>
      <dc:creator>DavidDurst</dc:creator>
      <dc:date>2022-12-16T23:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Select by Attribute using variable in Model Builder</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1242646#M63624</link>
      <description>&lt;P&gt;Have you tried to run your model from the toolbox? Although it looks like the model has failed, I think it may still run once you add a value in as a parameter.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 13:09:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1242646#M63624</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-12-20T13:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Select by Attribute using variable in Model Builder</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1242749#M63638</link>
      <description>&lt;P&gt;I have not tried to run the model yet. Part of the reason is that I'm also unsure how to reference the input parameter in my SQL query. Can you explain that to me? Is it simply MOD(ELEVATION,SupplementaryInterval)=0 ? I'm not real well versed in SQL either.&lt;/P&gt;&lt;P&gt;For some context, the part shown is the first in a series of select using a given parameter, run field calculator, rinse and repeat 3-4 times. My goal is to have attributes in a field that specify whether the contours are major, intermediate, minor, or supplementary (will make filtering contours and symbology much faster). As I have it set up now, each one of those requires a separate selection by parameter.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 18:05:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1242749#M63638</guid>
      <dc:creator>DavidDurst</dc:creator>
      <dc:date>2022-12-20T18:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select by Attribute using variable in Model Builder</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1242754#M63640</link>
      <description>&lt;P&gt;Would something like this work for you? Right click on&amp;nbsp;&lt;EM&gt;Select Layer by Attribute&amp;nbsp;&lt;/EM&gt; then&amp;nbsp;&lt;EM&gt;Create Variable from Parameter&amp;nbsp;&lt;/EM&gt;then&amp;nbsp;&lt;EM&gt;Expression.&amp;nbsp;&lt;/EM&gt;The user will be prompted to enter a value:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SHartholt_0-1671560043412.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58977i864F47FBC7099364/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SHartholt_0-1671560043412.png" alt="SHartholt_0-1671560043412.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would also suggest reading up on inline variable substitutions:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/inline-variable-substitution.htm#:~:text=In%20ModelBuilder%2C%20you%20can%20substitute,is%20called%20inline%20variable%20substitution." target="_blank"&gt;Inline variable substitution—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 18:18:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1242754#M63640</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-12-20T18:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Select by Attribute using variable in Model Builder</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1243491#M63739</link>
      <description>&lt;P&gt;Yes, that did it, more or less. It prompts for the SQL query for each selection, but I can live with that for now. I'd like to read up on inline variable substitution so the various inputs are just numbers rather than expressions, but this got the job done. Thanks a bunch!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavidDurst_0-1671754516577.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59205iF8198ECC8D630393/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DavidDurst_0-1671754516577.png" alt="DavidDurst_0-1671754516577.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 00:15:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/select-by-attribute-using-variable-in-model/m-p/1243491#M63739</guid>
      <dc:creator>DavidDurst</dc:creator>
      <dc:date>2022-12-23T00:15:43Z</dc:date>
    </item>
  </channel>
</rss>

