I am trying to label water lines for a web map that is untimely going to be used in a web app. I want the lines labeled with the diameter and the material abbreviated. The data for the mains does not have a field for the abbreviated materials. I am trying to use if-then-else statements to accomplish this. I have tried various ways, but the issue I am encountering is only the first statement is evaluated. When a line evaluates false, it does not evaluate the next if then else statement. This problem prevents me from getting the labels for all the mains working.
How can I write an if-then-else expression that will evaluate the next line when false? A general example or the name of the peculiar function will greatly help. Also, what language are these expressions written in? (my guess is arcade)
Notes
enterprise version: 10.6
portal version 10.6
Thanks
Laura
Solved! Go to Solution.
Use when. you can add as many cases as you need. just end with a final result if non of the cases are true
show your code
I tried these so far...
The code I first tried was:
IIf($feature.MATERIAL == "Ductile Iron" , $feature.DIAMETER + "DIP", "Pass")
IIf($feature.MATERIAL == "Concrete (Non-Reinforced)" , $feature.DIAMETER + "CON", "Pass")
....
The "pass" is a place holder for going to the next line. I never figured out what that fuction was and I not certain there is one that can be used there for what I trying to do.
Then I tried
if($feature.MATERIAL == "Ductile Iron" ){$feature.DIAMETER + "DIP"}
else ($feature.MATERIAL == "Concrete (Non-Reinforced)"{$feature.DIAMETER + "CON"}
...
Thanks
Laura
Use when. you can add as many cases as you need. just end with a final result if non of the cases are true