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

Labeling expression

$
0
0
Hi,

I have an SQL Query that determines if the label is on or off ("area" >= 20000) ! Also I have a conditioning label expression for the field i want to display. I was wondering if it's possible to concatenate them into the label expression.

Code:

def FindLabel ( [SitPPtr]  ):
  if [SitPPtr]  == '-34:40' or [SitPPtr]  == '-17:20':
    return "n.d."
  else:
    return [SitPPtr]

I've tried this expression below but I think i'm missing something :

Code:

def FindLabel ( [Superficie], [SitPPtr]  ):
  if [Superficie] >= 20000:
    if [SitPPtr]  == '-34:40' or [SitPPtr]  == '-17:20':
      return "n.d."
    else:
      return [SitPPtr]
  pass

Thanks you for your help

Viewing all articles
Browse latest Browse all 2485

Trending Articles