<?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: Parsing Arcade Expression multi values in HTML in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312649#M53602</link>
    <description>&lt;P&gt;Your return contains just two properties, type and text. The text property will contain the values and HTML code. The blog shows an example of how you can put that directly into the text property. You can also use a variable. For example, here's one I did recently&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var related = FeatureSetByRelationshipName($feature, "DCGIS.SURDOCS");
var relatedCount = count(related);
var output;

if (relatedCount == 0) {
  output = `&amp;lt;p&amp;gt;There are no surveys for this property.&amp;lt;\p&amp;gt;`;
} else if (relatedCount == 1) {
  var rec = First(related);
  output = `There is 1 survey for this property:
    &amp;lt;br&amp;gt;&amp;amp;nbsp •  &amp;lt;a href="${rec.FILENETLINK}"&amp;gt;${rec.DOCGUID}&amp;lt;/a&amp;gt;`;
} else {
  output = `There are ${relatedCount} surveys for this property:`;
  for (var rec in related) {
    output += `&amp;lt;br&amp;gt;&amp;amp;nbsp •  &amp;lt;a href="${rec.FILENETLINK}"&amp;gt;${rec.DOCGUID}&amp;lt;/a&amp;gt;`;
  }
}

return { 
	type : 'text', 
	text : output
}&lt;/LI-CODE&gt;&lt;P&gt;which produced this popup, containing clickable links&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="popup.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/76550iC276EC9F515B57E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="popup.png" alt="popup.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 17:20:07 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2023-07-27T17:20:07Z</dc:date>
    <item>
      <title>Parsing Arcade Expression multi values in HTML</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312584#M53597</link>
      <description>&lt;P&gt;I have arcade expression, {expression/expr0}, contains multi values, for example: [A1, A2, B1, B2]. I am wondering if there is a way to extract each of those values in the HTML. for example if I would like get A1 and B1 in first HTML line and get A2 and B2 in second&amp;nbsp; HTML line without needed to create each individual Arcade expression.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 15:24:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312584#M53597</guid>
      <dc:creator>loum</dc:creator>
      <dc:date>2023-07-27T15:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Arcade Expression multi values in HTML</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312607#M53598</link>
      <description>&lt;P&gt;You can use an &lt;A href="https://doc.arcgis.com/en/arcgis-online/create-maps/configure-pop-ups-mv.htm#ESRI_SECTION1_F5CB09E0313A4DA1BD10F18D875FFC3F" target="_self"&gt;Arcade element&lt;/A&gt; that contains your values with HTML coding. Take a look at this &lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/part-1-introducing-arcade-pop-up-content-elements/" target="_self"&gt;blog&lt;/A&gt; for a deeper dive into them.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 15:57:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312607#M53598</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-07-27T15:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Arcade Expression multi values in HTML</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312623#M53600</link>
      <description>&lt;P&gt;Thank you! I was almost there.&lt;/P&gt;&lt;P&gt;Now in my arcade expression I can return values:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;return { &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;type: "fields", &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fieldInfoa1: A1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fieldInfoa2: A2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fieldInfb1: B1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fieldInfb2: B2&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, in the HTML Popup, I can see arcade expression as [object object] or as dictionary type but I struggled on&amp;nbsp;how to parse individual value. I tried&amp;nbsp; {expression/expr0[0]},&amp;nbsp;{expression/expr0.0},&amp;nbsp;{expression/expr0/fieldInfoa1} but didn't work. Any idea on?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 16:43:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312623#M53600</guid>
      <dc:creator>loum</dc:creator>
      <dc:date>2023-07-27T16:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Arcade Expression multi values in HTML</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312649#M53602</link>
      <description>&lt;P&gt;Your return contains just two properties, type and text. The text property will contain the values and HTML code. The blog shows an example of how you can put that directly into the text property. You can also use a variable. For example, here's one I did recently&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var related = FeatureSetByRelationshipName($feature, "DCGIS.SURDOCS");
var relatedCount = count(related);
var output;

if (relatedCount == 0) {
  output = `&amp;lt;p&amp;gt;There are no surveys for this property.&amp;lt;\p&amp;gt;`;
} else if (relatedCount == 1) {
  var rec = First(related);
  output = `There is 1 survey for this property:
    &amp;lt;br&amp;gt;&amp;amp;nbsp •  &amp;lt;a href="${rec.FILENETLINK}"&amp;gt;${rec.DOCGUID}&amp;lt;/a&amp;gt;`;
} else {
  output = `There are ${relatedCount} surveys for this property:`;
  for (var rec in related) {
    output += `&amp;lt;br&amp;gt;&amp;amp;nbsp •  &amp;lt;a href="${rec.FILENETLINK}"&amp;gt;${rec.DOCGUID}&amp;lt;/a&amp;gt;`;
  }
}

return { 
	type : 'text', 
	text : output
}&lt;/LI-CODE&gt;&lt;P&gt;which produced this popup, containing clickable links&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="popup.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/76550iC276EC9F515B57E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="popup.png" alt="popup.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 17:20:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312649#M53602</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-07-27T17:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Arcade Expression multi values in HTML</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312713#M53603</link>
      <description>&lt;P&gt;Thank you for the example. But I need individual field value which those values will be in table format in HTML, my return format is like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return {
           type: "fields",
           fieldInfoa1: A1,
           fieldInfoa2: A2,
           fieldInfob1: B1,
           fieldInfob2: B2}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 18:57:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312713#M53603</guid>
      <dc:creator>loum</dc:creator>
      <dc:date>2023-07-27T18:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Arcade Expression multi values in HTML</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312732#M53604</link>
      <description>&lt;P&gt;Take a look at this &lt;A href="https://community.esri.com/t5/arcgis-online-documents/hide-field-in-pop-up-using-arcade/tac-p/1169750/highlight/true#M1518" target="_self"&gt;post&lt;/A&gt;, which shows how to return fieldnames. You would just have one fieldInfo with several values in it&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 18:22:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1312732#M53604</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-07-27T18:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Arcade Expression multi values in HTML</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1316818#M53824</link>
      <description>&lt;P&gt;Thank you! I saw that post and asked question in the post. I don't see it is possible to extract each variable/attribute in the HTML code. Also, I opened an Esri support case and they said it is NOT possible.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 12:21:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/parsing-arcade-expression-multi-values-in-html/m-p/1316818#M53824</guid>
      <dc:creator>loum</dc:creator>
      <dc:date>2023-08-09T12:21:26Z</dc:date>
    </item>
  </channel>
</rss>

