SQL Conditional Statement for Field Calculate for Feature Service?

753
0
02-25-2021 05:43 AM
Labels (3)
pmckinney
New Contributor II

In ArcGIS Online, you can use Field Calculate to automatically set the value of a field based upon other fields or expressions.  We are trying to learn if we can use a conditional statement in SQL to set the value.  I called Esri Support, but got disconnected, and they never created an incident or followed-up. 

However, they did reference a Help Page, which lists SQL expressions that can be used in ArcGIS Online.  Can anybody confirm if what I'm trying to do below is or is not possible using SQL for Field Calculate?  Because we have editor tracking set, we are not able to use Arcade expressions.

Pseudo Code:

if [Creator] = user1 then set [Field] to 'Option A'

else if [Creator] = user2 then set [Field] to 'Option B'

else set [Field] to 'Other'

 

 

0 Replies