Hi! I am trying to get familiar with the new Arcade language. Specifically as used in Attribute Rules.
I am trying to create an Arcade expression to calculate a field in ArcGIS Pro. In my streets feature there are 4 number fields to evaluate. I can easily use the Min() function to do this. The problem that I am having is sometimes there is a 0 in one or more fields. I need the lowest number that is not a 0. In python I had this script which worked well:
<SPAN class="">min</SPAN><SPAN class="">([</SPAN><SPAN class="">x </SPAN><SPAN class="">for</SPAN><SPAN class=""> x in </SPAN><SPAN class="">(</SPAN><SPAN class=""> </SPAN><SPAN class="">!</SPAN><SPAN class="">L_F_ADD</SPAN><SPAN class="">!,</SPAN><SPAN class=""> </SPAN><SPAN class="">!</SPAN><SPAN class="">L_T_ADD</SPAN><SPAN class="">!,</SPAN><SPAN class=""> </SPAN><SPAN class="">!</SPAN><SPAN class="">R_F_ADD</SPAN><SPAN class="">!,</SPAN><SPAN class=""> </SPAN><SPAN class="">!</SPAN><SPAN class="">R_T_ADD</SPAN><SPAN class="">!)</SPAN><SPAN class=""> </SPAN><SPAN class="">if</SPAN><SPAN class=""> x is not </SPAN><SPAN class="">0</SPAN><SPAN class="">])</SPAN>
I have tried redoing this in Arcade but can't figure it out. Any ideas?