<?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: String to Numeric Calculations in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/string-to-numeric-calculations/m-p/1216955#M48103</link>
    <description>&lt;P&gt;Hi, I could try it in ArcGIS pro but not AGOL, because it says;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OznurGeze_0-1664376680153.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52382i588C32B746F18292/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OznurGeze_0-1664376680153.png" alt="OznurGeze_0-1664376680153.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you anyway &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Have a great day, too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2022 14:52:26 GMT</pubDate>
    <dc:creator>OznurGeze</dc:creator>
    <dc:date>2022-09-28T14:52:26Z</dc:date>
    <item>
      <title>String to Numeric Calculations</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/string-to-numeric-calculations/m-p/1216936#M48100</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have a string field that contains digits, for example "7-8", and I want to calculate it to new numeric field (double) as average "(7+8)/2" of the string value. Is it possible? The dash between integers seem to cause the problem.&amp;nbsp; Do you have any idea If It could be done?&lt;/P&gt;&lt;P&gt;Best wishes,&lt;/P&gt;&lt;P&gt;Öznur&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 14:27:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/string-to-numeric-calculations/m-p/1216936#M48100</guid>
      <dc:creator>OznurGeze</dc:creator>
      <dc:date>2022-09-28T14:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: String to Numeric Calculations</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/string-to-numeric-calculations/m-p/1216943#M48101</link>
      <description>&lt;P&gt;With Arcade:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return Average(Split($feature.TextField, "-", -1, true))&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Sep 2022 14:37:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/string-to-numeric-calculations/m-p/1216943#M48101</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-09-28T14:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: String to Numeric Calculations</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/string-to-numeric-calculations/m-p/1216955#M48103</link>
      <description>&lt;P&gt;Hi, I could try it in ArcGIS pro but not AGOL, because it says;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OznurGeze_0-1664376680153.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52382i588C32B746F18292/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OznurGeze_0-1664376680153.png" alt="OznurGeze_0-1664376680153.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you anyway &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Have a great day, too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 14:52:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/string-to-numeric-calculations/m-p/1216955#M48103</guid>
      <dc:creator>OznurGeze</dc:creator>
      <dc:date>2022-09-28T14:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: String to Numeric Calculations</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/string-to-numeric-calculations/m-p/1216993#M48105</link>
      <description>&lt;P&gt;It won't be pretty, but using AGOL's subset of &lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm" target="_blank"&gt;allowable SQL functions&lt;/A&gt;, you can try something like this:&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;((SUBSTRING(str_field, 1, (CHAR_LENGTH(str_field) - POSITION('-', str_field)))) + (SUBSTRING(str_field, (POSITION('-', str_field) + 1), 100))) / 2&lt;/LI-CODE&gt;&lt;P&gt;I don't have an AGOL layer to fully test this on, but here's a DB Fiddle that's pretty close, though the POSITION function follows a different syntax:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.db-fiddle.com/f/bJkJyB5dy4jNvVA5Qz6aHo/0" target="_blank"&gt;https://www.db-fiddle.com/f/bJkJyB5dy4jNvVA5Qz6aHo/0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_0-1664381125186.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52391i60857B237AA6DE93/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_0-1664381125186.png" alt="jcarlson_0-1664381125186.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 16:05:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/string-to-numeric-calculations/m-p/1216993#M48105</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-09-28T16:05:27Z</dc:date>
    </item>
  </channel>
</rss>

