<?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 SQL Conditional Statement for Field Calculate for Feature Service? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/sql-conditional-statement-for-field-calculate-for/m-p/1030413#M38668</link>
    <description>&lt;P&gt;In ArcGIS Online, you can use &lt;A href="https://doc.arcgis.com/en/arcgis-online/manage-data/calculate-fields.htm" target="_self"&gt;Field Calculate&lt;/A&gt; to automatically set the value of a field based upon other fields or expressions.&amp;nbsp; We are trying to learn if we can use a conditional statement in SQL to set the value.&amp;nbsp; I called Esri Support, but got disconnected, and they never created an incident or followed-up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, they did reference a &lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm" target="_self"&gt;Help Page&lt;/A&gt;, which lists SQL expressions that can be used in ArcGIS Online.&amp;nbsp; &lt;U&gt;&lt;STRONG&gt;Can anybody confirm if what I'm trying to do below is or is not possible&amp;nbsp;using SQL for Field Calculate&lt;/STRONG&gt;&lt;/U&gt;?&amp;nbsp; Because we have editor tracking set, we are not able to use Arcade expressions.&lt;/P&gt;&lt;P&gt;&lt;U&gt;Pseudo Code&lt;/U&gt;:&lt;/P&gt;&lt;P&gt;if [Creator] = user1 then set [Field] to 'Option A'&lt;/P&gt;&lt;P&gt;else if [Creator] = user2 then set [Field] to 'Option B'&lt;/P&gt;&lt;P&gt;else set [Field] to 'Other'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Feb 2021 13:43:46 GMT</pubDate>
    <dc:creator>pmckinney</dc:creator>
    <dc:date>2021-02-25T13:43:46Z</dc:date>
    <item>
      <title>SQL Conditional Statement for Field Calculate for Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sql-conditional-statement-for-field-calculate-for/m-p/1030413#M38668</link>
      <description>&lt;P&gt;In ArcGIS Online, you can use &lt;A href="https://doc.arcgis.com/en/arcgis-online/manage-data/calculate-fields.htm" target="_self"&gt;Field Calculate&lt;/A&gt; to automatically set the value of a field based upon other fields or expressions.&amp;nbsp; We are trying to learn if we can use a conditional statement in SQL to set the value.&amp;nbsp; I called Esri Support, but got disconnected, and they never created an incident or followed-up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, they did reference a &lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm" target="_self"&gt;Help Page&lt;/A&gt;, which lists SQL expressions that can be used in ArcGIS Online.&amp;nbsp; &lt;U&gt;&lt;STRONG&gt;Can anybody confirm if what I'm trying to do below is or is not possible&amp;nbsp;using SQL for Field Calculate&lt;/STRONG&gt;&lt;/U&gt;?&amp;nbsp; Because we have editor tracking set, we are not able to use Arcade expressions.&lt;/P&gt;&lt;P&gt;&lt;U&gt;Pseudo Code&lt;/U&gt;:&lt;/P&gt;&lt;P&gt;if [Creator] = user1 then set [Field] to 'Option A'&lt;/P&gt;&lt;P&gt;else if [Creator] = user2 then set [Field] to 'Option B'&lt;/P&gt;&lt;P&gt;else set [Field] to 'Other'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 13:43:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sql-conditional-statement-for-field-calculate-for/m-p/1030413#M38668</guid>
      <dc:creator>pmckinney</dc:creator>
      <dc:date>2021-02-25T13:43:46Z</dc:date>
    </item>
  </channel>
</rss>

