I am trying to build out my label field. I successfully got the function to return a value. I want to go one step further and reference a second field. Is that possible. If the Location ID is valid I want to return the location code.
Office(!Location_IDs!)
def Office(Location_IDs):
if (Location_IDs>= -1):
return ""
else:
return LOC_CODE
Solved! Go to Solution.
You can add as many parameters as you like to your function:
Office(!Location_IDs!, !LOC_CODE!)
def Office(Location_ID, LOC_CODE):
if (Location_ID >= -1):
return ""
else:
return LOC_CODE
Try this?
Office(!Location_IDs!,!LOC_CODE!)
def Office(Location_IDs,LOC_CODE):
if (Location_IDs>= -1):
return ""
else:
return LOC_CODE
hahaha: @DavidPike beat me by a few seconds!
You can add as many parameters as you like to your function:
Office(!Location_IDs!, !LOC_CODE!)
def Office(Location_ID, LOC_CODE):
if (Location_ID >= -1):
return ""
else:
return LOC_CODE
Try this?
Office(!Location_IDs!,!LOC_CODE!)
def Office(Location_IDs,LOC_CODE):
if (Location_IDs>= -1):
return ""
else:
return LOC_CODE
hahaha: @DavidPike beat me by a few seconds!
looks beautiful Joe!