AnsweredAssumed Answered

GIS Pro - Python and Arcade Labeling

Question asked by cgoessl on Nov 16, 2018
Latest reply on Nov 16, 2018 by cgoessl

We are attempting to do a simple if/else statement for labeling on a project but keep coming up with an error. The code is as follows:


def FindLabel ([Name], [Type]):
   if [Type]= 'Church':
      return "Church"
      return "Not Church"


The error that we are getting is as follows:

Invalid Expression

Error 0 on line 0

   File "<string>", line 2

      if esri_1 = 'Church':


SyntaxError: invalid syntax



We also worked on arcade (New to us). Here is that code:

if DomainName($feature, 'Type' ="Church") {
return $feature.Name
else {
return "Not Church"


We get the following error:

Invalid Expression

Error on line 1

Open parenthesis expected.




Any help will be greatly appreciated!

Chris Goessl & Justin Fowler

City of Kettering