<?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: Geoprocessing code block help in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-code-block-help/m-p/1153466#M26232</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/566917"&gt;@Chelsea_Trusdell&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I want to write a script that adds a text field to the roads.shp feature class called FERRY. This new field&lt;BR /&gt;should be populated with values of YES and NO depending on the value of the FEATURE field. If the value of the FEATURE field is ‘Ferry Crossing’, the value of the FERRY field should be YES – otherwise the value of the&lt;BR /&gt;FERRY field should be NO.&lt;/P&gt;&lt;P&gt;I want to write the code that Uses a field calculation code block section within the geoprocessing tool. do i create a function in the code block or use da.cursor method within the code block. i don't have experience writing in code block before.&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What have you got so far?&lt;/P&gt;&lt;P&gt;Did you see the code block examples in the help?&amp;nbsp; There are lots in the Community as well&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/modelbuilder-toolbox/examples-of-using-calculate-value-tool.htm" target="_blank" rel="noopener"&gt;Examples of using Calculate Value—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2022 00:36:45 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2022-03-15T00:36:45Z</dc:date>
    <item>
      <title>Geoprocessing code block help</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-code-block-help/m-p/1153434#M26231</link>
      <description>&lt;P&gt;I&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 21:38:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-code-block-help/m-p/1153434#M26231</guid>
      <dc:creator>Chelsea_Trusdell</dc:creator>
      <dc:date>2022-03-14T21:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing code block help</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-code-block-help/m-p/1153466#M26232</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/566917"&gt;@Chelsea_Trusdell&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I want to write a script that adds a text field to the roads.shp feature class called FERRY. This new field&lt;BR /&gt;should be populated with values of YES and NO depending on the value of the FEATURE field. If the value of the FEATURE field is ‘Ferry Crossing’, the value of the FERRY field should be YES – otherwise the value of the&lt;BR /&gt;FERRY field should be NO.&lt;/P&gt;&lt;P&gt;I want to write the code that Uses a field calculation code block section within the geoprocessing tool. do i create a function in the code block or use da.cursor method within the code block. i don't have experience writing in code block before.&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What have you got so far?&lt;/P&gt;&lt;P&gt;Did you see the code block examples in the help?&amp;nbsp; There are lots in the Community as well&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/modelbuilder-toolbox/examples-of-using-calculate-value-tool.htm" target="_blank" rel="noopener"&gt;Examples of using Calculate Value—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 00:36:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-code-block-help/m-p/1153466#M26232</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-03-15T00:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing code block help</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-code-block-help/m-p/1153750#M26233</link>
      <description>&lt;P&gt;Have you looked at using contingent values for FERRY?&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/contingent-values.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/contingent-values.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 11:55:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-code-block-help/m-p/1153750#M26233</guid>
      <dc:creator>Darrin-Smith</dc:creator>
      <dc:date>2022-03-15T11:55:16Z</dc:date>
    </item>
  </channel>
</rss>

