Label Expression

539
3
03-17-2021 02:22 PM
ivyhinson12
New Contributor
I need to create a label expression where only the largest of three columns is displayed. The columns are: [CP_N], [CP_S] ,[CP_W]
 
Please help!
0 Kudos
3 Replies
jcarlson
MVP Esteemed Contributor

Do you have a preference as to which label expression profile is being used? You've got the python and vbscript tags both on here.

In the expression, try something like this:

def FindLabel ( ):
    
    a, b, c = [CP_N], [CP_S], [CP_W]
    
    if a > b and a > c:
        return a
    elif b > c:
        return b
    else:
        return c
    
FindLabel()
- Josh Carlson
Kendall County GIS
0 Kudos
RobertBorchert
Frequent Contributor III

That is a very good answer.  

0 Kudos
DougBrowning
MVP Esteemed Contributor

What product is this for?  You posted to the Survey123 board.

thanks

0 Kudos