I cannot figure out how to call the related field using this function to populate the content of the popup. I have tried relationships/0/FieldName everywhere I thought it was necessary with no luck. I think I need to call fieldInfos within the content syntax, Correct?
liquefactionPopup <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>value<SPAN class="punctuation token">,</SPAN> key<SPAN class="punctuation token">,</SPAN> data<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">var</SPAN> content <SPAN class="operator token">=</SPAN> <SPAN class="string token">""</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>key <SPAN class="operator token">===</SPAN> <SPAN class="string token">"LQSHazardUnit"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>data<SPAN class="punctuation token">.</SPAN>LQSHazardUnit<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
content <SPAN class="operator token">+</SPAN><SPAN class="operator token">=</SPAN> <SPAN class="string token">"<span class='bold' title='Magnitude'><b>LQSHazardUnit: </b></span>"</SPAN> <SPAN class="operator token">+</SPAN> data<SPAN class="punctuation token">.</SPAN>LQSHazardUnit <SPAN class="operator token">+</SPAN> <SPAN class="string token">"<br/>"</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>key <SPAN class="operator token">===</SPAN> <SPAN class="string token">"LQSMappedScale"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>data<SPAN class="punctuation token">.</SPAN>LQSMappedScale<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
content <SPAN class="operator token">+</SPAN><SPAN class="operator token">=</SPAN> <SPAN class="string token">"<span class='bold' title='Longitude'><b>LQSMappedScale: </b></span>"</SPAN> <SPAN class="operator token">+</SPAN> data<SPAN class="punctuation token">.</SPAN>LQSMappedScale <SPAN class="operator token">+</SPAN> <SPAN class="string token">"<br/>"</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">return</SPAN> content<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">const</SPAN> liquefaction <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">FeatureLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN>
url<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"https://services.arcgis.com/3"</SPAN><SPAN class="punctuation token">,</SPAN>
title<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"Liquefaction Susceptibility"</SPAN><SPAN class="punctuation token">,</SPAN>
visible<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">,</SPAN>
outFields<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"*"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN>
popupTemplate<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
title<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"Liquefaction Susceptibility"</SPAN><SPAN class="punctuation token">,</SPAN>
content<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"{LQSHazardUnit:liquefactionPopup}{LQSMappedScale:liquefactionPopup}"</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>