When using Buffer, a popup will not display a value in a Web AppBuilder App. However, it is shown in an AGOL map. Centroid(), which was released with Arcade 1.3, works properly.
Versions:
WAB Developer Edition 2.6 (JSAPI 3.22)
Arcade: 1.3 (JSAPI ??)
Example:
This will return the xmin value of the extent of a buffer.
<SPAN class="keyword token">var</SPAN> geom <SPAN class="operator token">=</SPAN> <SPAN class="token function">Geometry</SPAN><SPAN class="punctuation token">(</SPAN>$feature<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">var</SPAN> buf <SPAN class="operator token">=</SPAN> <SPAN class="token function">Buffer</SPAN><SPAN class="punctuation token">(</SPAN>geom<SPAN class="punctuation token">,</SPAN> <SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'miles'</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">var</SPAN> ext <SPAN class="operator token">=</SPAN> <SPAN class="token function">Extent</SPAN><SPAN class="punctuation token">(</SPAN>buf<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">return</SPAN> ext<SPAN class="punctuation token">.</SPAN>xmin<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The resulting popup in AGOL is correct. It does not appear in WAB.

Kelly Hutchins Xander Bakker KEkenes-esristaff