I have a field that has numbers and zeros. I want to label the the numbers as is but the zeros need to label as the word "pending". I know the start of the code is $feature(AADT_2020_Label) which will label the number. How do I make the expression if AADT_2020_Label equals zero label as pending? I've tried just putting pending in the text field but for some reason it is not liking it.
There's still an open parentheses in the return feature with no closed parentheses. I took it out and it seems to be working. Thank you.
sure:
if ($feature["AADT_2020_LBL"] > 0) {return $feature(["AADT_2020_LBL"]} else {return "Pending"}
if ($feature(["AADT_2020_LBL"] > 0) {return $feature(["AADT_2020_LBL"]} else {return "Pending"}
I think there needs to be closed parentheses. I am getting the error of Parse Error:Line 1: Unexpected token {
if ( $feature(["AADT_2020_Label"] > 0) { return $feature(["AADT_2020_Label"] } else { return "Pending" }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.