I have a YEAR field, controlled by a domain (1950-2030). The user can choose to pick a year from the picklist or do nothing, in which case
<SPAN class="token function">Year</SPAN><SPAN class="punctuation token">(</SPAN>$feature<SPAN class="punctuation token">.</SPAN>CREATEDATE<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
will populate the year correctly.
But if I use
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>$feature<SPAN class="punctuation token">.</SPAN>YEAR <SPAN class="operator token">==</SPAN> null<SPAN class="punctuation token">)</SPAN>
<SPAN class="token function">Year</SPAN><SPAN class="punctuation token">(</SPAN>$feature<SPAN class="punctuation token">.</SPAN>CREATEDATE<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">else</SPAN> $feature<SPAN class="punctuation token">.</SPAN>YEAR<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
and do not pick a year from the picklist, nothing happens. The year is not populated.
So what I'm trying to do is have Arcade ignore the user input, but if the user inputs nothing, perform the calculation.