Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Conditional labelling question

$
0
0
Hi,

I'm trying to label by a text field fName but suppress labels based on 2 (or more) values.

ATM my code looks like this:

Code:

def FindLabel ( [fName] ):
  if ([fName]) = "Roundabout":
  if ([fName]) = "Track":
      return ""
  else:
      return [fName]

but this is the first thing I've attempted using Python, but I don't want to be defeated!! :)

It's throwing an error that states:

Error 0 on line 0.
Syntax Error: invalid syntax (<string>, line 2).

Any help appreciated!

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images