<?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: New to Python in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/new-to-python/m-p/871580#M12915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well&amp;nbsp; you might want the &lt;A href="https://community.esri.com/space/2145"&gt;Python&lt;/A&gt;‌ space, so I would move this question if I could, but a Share might do&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Feb 2019 02:36:45 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2019-02-07T02:36:45Z</dc:date>
    <item>
      <title>New to Python</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/new-to-python/m-p/871579#M12914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am new to Python and I am trying to write a code in Field calculator to update a field using another field in attribute table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please help me with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 17:00:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/new-to-python/m-p/871579#M12914</guid>
      <dc:creator>ChrisKendrick</dc:creator>
      <dc:date>2019-02-06T17:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: New to Python</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/new-to-python/m-p/871580#M12915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well&amp;nbsp; you might want the &lt;A href="https://community.esri.com/space/2145"&gt;Python&lt;/A&gt;‌ space, so I would move this question if I could, but a Share might do&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2019 02:36:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/new-to-python/m-p/871580#M12915</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-02-07T02:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: New to Python</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/new-to-python/m-p/871581#M12916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you read &lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/calculate-field.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/calculate-field.htm"&gt;Calculate Field—Data Management toolbox | ArcGIS Desktop&lt;/A&gt; , what part of the syntax are you having difficulties with specifically?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:47:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/new-to-python/m-p/871581#M12916</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-02-07T16:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: New to Python</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/new-to-python/m-p/871582#M12917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to write a function to do what you want and then call that function from the field calculator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Arcmap: click the show codeblock check box and paste your function in the Pre-Logic Script code box.&lt;/P&gt;&lt;P&gt;Pro: paste your function in the code block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure the expression type is set to python.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then pace the field you want to call in the expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for example this is a simple script that will run a regular expression on the specified field and return any number at the beginning of the field.&amp;nbsp; For me I use it to collect house numbers at the front of an address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/437454_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So as you can see this will calculate for the field HOUSENUM.&amp;nbsp; I pass the field LSN to the regex function that I defined in the code block.&amp;nbsp; It runs some regular expression stuff and returns the text variable which is stored in the field HOUSENUM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2019 15:56:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/new-to-python/m-p/871582#M12917</guid>
      <dc:creator>BenBond</dc:creator>
      <dc:date>2019-02-15T15:56:31Z</dc:date>
    </item>
  </channel>
</rss>

