<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Arcade expression doesn't show in pop-up in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-doesn-t-show-in-pop-up/m-p/1200289#M47279</link>
    <description>&lt;UL&gt;&lt;LI&gt;You're using Text() on a feature, which returns a json string containing info about the geometry and attributes of the feature. What you want to do is extracting the fields of the feature, not the whole feature.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;You're not adding to your popupText sring. Instead you reassign a new value to it each time, which is why you only see one line as a result.&lt;/LI&gt;&lt;LI&gt;There's no need to call Text() here. Your fields are all strings, the number format won't do anything. What you could do is using DefaultValue() to insert some meaningful text if there's a null value in a field.&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="javascript"&gt;var popupLines = [
    "Age: " + DefaultValue(cou.age, "not reported"),
    "Gender: " + DefaultValue(cou.gender, "not reported"),
    "Race: " + DefaultValue(cou.race, "not reported"),
]
return Concatenate (popupLines, TextFormatting.NewLine)
// or comma sepated:
// return Concatenate(popupLines, ", ")&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 08 Aug 2022 09:57:29 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2022-08-08T09:57:29Z</dc:date>
    <item>
      <title>Arcade expression doesn't show in pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-doesn-t-show-in-pop-up/m-p/1152362#M44803</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have this code and I getting result in test but I can't set it up in pop-up of new map viewer?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var intersectLayer =Top(OrderBy(FeatureSetByName($map,"xyz"),"Inspection_Date DES"), 3);

return intersectLayer&lt;/LI-CODE&gt;&lt;P&gt;and this is I am seeing on pop-up&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ARM_0-1646862342247.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/35996i7DB20D7210477312/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ARM_0-1646862342247.png" alt="ARM_0-1646862342247.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 21:46:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-doesn-t-show-in-pop-up/m-p/1152362#M44803</guid>
      <dc:creator>anonymous55</dc:creator>
      <dc:date>2022-03-09T21:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression doesn't show in pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-doesn-t-show-in-pop-up/m-p/1152458#M44809</link>
      <description>&lt;P&gt;intersectLayer is a FeatureSet. It will be shown in the expression builder's test, but popups can't show it.&lt;/P&gt;&lt;P&gt;You have to build a string:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var inspection_dates = []
for(var f in intersectLayer) {
    Push(inspection_dates, f.Inspection_Date)
}
return Concatenate(inspection_dates, TextFormatting.NewLine)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 10 Mar 2022 08:55:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-doesn-t-show-in-pop-up/m-p/1152458#M44809</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-03-10T08:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression doesn't show in pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-doesn-t-show-in-pop-up/m-p/1199864#M47260</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have this code which bring different fields from another layer to pop up but I can't get the result on popup&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var fips = $feature["parent_id"]

var dd = FeatureSetByName($map,
"Survey v2", ['age','gender','race'],False)

var fillterSur = "survey_id = @fips"

var cou = First(Filter(dd, fillterSur))

var popupTEXT = "Age: "
+Text(cou,'#,###')
var popupTEXT = "gender: "
+Text(cou,'#,###')
var popupTEXT = "race: "
+Text(cou,'#,###')

return popupTEXT&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result I am getting is like this :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anonymous_0-1659712636612.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47904i36D75C0AEF861A5F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anonymous_0-1659712636612.png" alt="anonymous_0-1659712636612.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 15:22:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-doesn-t-show-in-pop-up/m-p/1199864#M47260</guid>
      <dc:creator>anonymous55</dc:creator>
      <dc:date>2022-08-05T15:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression doesn't show in pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-doesn-t-show-in-pop-up/m-p/1200289#M47279</link>
      <description>&lt;UL&gt;&lt;LI&gt;You're using Text() on a feature, which returns a json string containing info about the geometry and attributes of the feature. What you want to do is extracting the fields of the feature, not the whole feature.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;You're not adding to your popupText sring. Instead you reassign a new value to it each time, which is why you only see one line as a result.&lt;/LI&gt;&lt;LI&gt;There's no need to call Text() here. Your fields are all strings, the number format won't do anything. What you could do is using DefaultValue() to insert some meaningful text if there's a null value in a field.&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="javascript"&gt;var popupLines = [
    "Age: " + DefaultValue(cou.age, "not reported"),
    "Gender: " + DefaultValue(cou.gender, "not reported"),
    "Race: " + DefaultValue(cou.race, "not reported"),
]
return Concatenate (popupLines, TextFormatting.NewLine)
// or comma sepated:
// return Concatenate(popupLines, ", ")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Aug 2022 09:57:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-doesn-t-show-in-pop-up/m-p/1200289#M47279</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-08-08T09:57:29Z</dc:date>
    </item>
  </channel>
</rss>

