AnsweredAssumed Answered

New to python

Question asked by skoroblitsas on Jun 22, 2012
Latest reply on Jun 29, 2012 by skoroblitsas
Hi ive got a figure that i need to prepare that consists of 100's of bores with different contaminants, looking for a better way to add the data into Arcgis
Ive got the data georeferenced and in a table, but having problems setting up the labels to represent the data on the figure

eg: So say ive got one bore that has 3 exceedences and looking at 2 different criteria (eg: if ammonia is over 0.1 it is exceeding criteria A which would need to be bold, if it is over 0.5 it is exceeding criteria A and B, it would need to be Bold and red, then if Sodium is over 0.2 it is exceeding criteria A which would need to be bold, if it is over 0.7 it is exceeding criteria A and B etc)
I have no problems setting up code to display one of the contaminants but i cannot get it to put the second item on there

Bore 1:
Ammonia:  1
Sodium:    2
Nitrate:    0
Chloride:  4

def FindLabel ( [BORE], [Ammonia], [Nitrate], [Sodium], [Chloride] ):
  if [Ammonia] > 0.5:
    return "Ammonia - " + "<CLR red='255'>" + "<Bol>" [Ammonia] +"</Bol>" + "</CLR>"
  elif:[Ammonia] > 0.1:
    return "Ammonia - " + "<Bol>" [Ammonia] +"</Bol>"
After that is where im not sure, i figured a "then" or a "next" with a '\n' would move it on to the next contaminant but i dont know what im doing :)


If anyone could help and/or recommend a good place to get my Python skills up to scratch it would be much appreciated

Outcomes