<?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: Show more attributes as a clickable link using Arcade Element in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325611#M54377</link>
    <description>&lt;P&gt;No worries&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;if you come across something, please do let me know, thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Sep 2023 20:22:52 GMT</pubDate>
    <dc:creator>Ed_</dc:creator>
    <dc:date>2023-09-05T20:22:52Z</dc:date>
    <item>
      <title>Show more attributes as a clickable text (react) using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325029#M54342</link>
      <description>&lt;P&gt;I am trying to setup a popup such that I would like it to show more addresses (if greater than 2) as a clickable, like a clickable text (view more addresses). Below code is an attempt which opens up a new blank browser window in Experience Builder. Since the map is embedded in an Experience Builder app.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Purpose:&lt;/P&gt;&lt;P&gt;The popup should initially show only two addresses followed by a clickable text. If the user clicks on that text only then more addresses will show.&lt;BR /&gt;&lt;BR /&gt;Desired output:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SaadullahBaloch_0-1693677757896.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/79758i8929A43FF21F0578/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SaadullahBaloch_0-1693677757896.png" alt="SaadullahBaloch_0-1693677757896.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current code:&lt;/P&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;&lt;LI-CODE lang="c"&gt;/ Create a variable that is the FeatureSet of intersecting feature attributes
var Address = FeatureSetByName($map, "ADDRESS")

var intersectLayer = Intersects(Address, $feature)

// This variable will be used to track the number of addresses shown
var addressCount = 0;

var showAllAddresses = true;

var popup = '&amp;lt;h3&amp;gt;Property Summary&amp;lt;/h3&amp;gt;';

for (var f in intersectLayer){
  if (addressCount &amp;lt; 2) {
    popup += `&amp;lt;b&amp;gt;Address:&amp;lt;/b&amp;gt; ${f.FullAddress} &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;`;
    addressCount++;
  } else {
    //popup += '&amp;lt;em&amp;gt;More addresses...&amp;lt;/em&amp;gt;';
    popup += '&amp;lt;em&amp;gt;&amp;lt;a href="javascript&amp;amp;colon;toggleAddresses()"&amp;gt;View more addresses...&amp;lt;/a&amp;gt;&amp;lt;/em&amp;gt;';
    break; // Exit the loop after showing two addresses
  }
}
// Function to toggle the display of all addresses
function toggleAddresses() {
  showAllAddresses = true;
  // Rebuild the popup content with all addresses
  popup = '&amp;lt;h3&amp;gt;Property Summary&amp;lt;/h3&amp;gt;';
  for (var f in intersectLayer){
    popup += `&amp;lt;b&amp;gt;Address:&amp;lt;/b&amp;gt; ${f.FullAddress} &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;`;
  }
}&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 18:35:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325029#M54342</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-09-07T18:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable link using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325030#M54343</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;when you have the time, can you please have a look at it? Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2023 00:23:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325030#M54343</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-09-02T00:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable link using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325591#M54374</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;any ideas on this one? Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 19:35:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325591#M54374</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-09-05T19:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable link using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325603#M54376</link>
      <description>&lt;P&gt;No, I can't figure this one out&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 20:08:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325603#M54376</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-09-05T20:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable link using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325611#M54377</link>
      <description>&lt;P&gt;No worries&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;if you come across something, please do let me know, thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 20:22:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325611#M54377</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-09-05T20:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable link using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325613#M54378</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp; is it instead possible to create a collapsible list of addresses in the popup? Like if the addresses are more than two then the third, fourth addresses and so on will be initially hidden and if a user clicks on a text or something only then the entire list of addresses will show.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 14:23:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1325613#M54378</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-09-06T14:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable link using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1326220#M54426</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;can this &lt;A href="https://stackoverflow.com/questions/57476851/is-it-possible-to-change-the-collapse-table-displayed-in-popuptemplate-in-arcgis" target="_self"&gt;question's&lt;/A&gt; answer help in some way to the code in my question? Like to somehow use the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#title" target="_blank" rel="nofollow noopener noreferrer"&gt;PopupTemplate.title&lt;/A&gt;&amp;nbsp;or something similar?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 03:16:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1326220#M54426</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-09-07T03:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable link using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1326357#M54438</link>
      <description>&lt;P&gt;That's showing the results of multiple features at the same location. That's built into the popup, as shown in this &lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popuptemplate-filedsinfo-give-more-that-multiple/m-p/1324196#M82123" target="_self"&gt;discussion&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 13:24:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1326357#M54438</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-09-07T13:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable link using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1326372#M54439</link>
      <description>&lt;P&gt;Good morning &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;hope all is well, oh I see I guess I thought it would work in my case as well because of this, `&lt;SPAN&gt;property so you can show additional information by adding it to the title:`&lt;/SPAN&gt; mentioned in that post's answer. Oh well I will keep on searching.&lt;/P&gt;&lt;P&gt;I don't know if it's possible to use `react language` and JS Script in Arcade Elements because I think this question might require these two.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 13:44:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1326372#M54439</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-09-07T13:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable link using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1327424#M54510</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;happy Monday, hope all is well so, I did some searching and found an HTML snippet shown below, do you think this can help in what I am trying to achieve? Thank you so much time and help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&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;&lt;LI-CODE lang="c"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;Popup Example&amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;
        /* CSS styles for the popup */
        #popup {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: white;
            padding: 20px;
            border: 1px solid #ccc;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            z-index: 1000;
        }
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Addresses&amp;lt;/h1&amp;gt;
    &amp;lt;button id="showPopup"&amp;gt;Show Popup&amp;lt;/button&amp;gt;
   
    &amp;lt;!-- Popup div --&amp;gt;
    &amp;lt;div id="popup"&amp;gt;
        &amp;lt;h2&amp;gt;Selected Addresses&amp;lt;/h2&amp;gt;
        &amp;lt;p&amp;gt;Address 1: 123 Main St, City1&amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;Address 2: 456 Elm St, City2&amp;lt;/p&amp;gt;
        &amp;lt;a href="#" id="showAllAddresses"&amp;gt;Show All Addresses&amp;lt;/a&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;!-- Link section for the rest of the addresses --&amp;gt;
    &amp;lt;div id="restOfAddresses" style="display: none;"&amp;gt;
        &amp;lt;h2&amp;gt;Rest of the Addresses&amp;lt;/h2&amp;gt;
        &amp;lt;p&amp;gt;Address 3: 789 Oak St, City3&amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;Address 4: 101 Pine St, City4&amp;lt;/p&amp;gt;
        &amp;lt;!-- Add more addresses as needed --&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;script&amp;gt;
        // JavaScript to toggle the popup and link sections
        document.getElementById("showPopup").addEventListener("click", function() {
            document.getElementById("popup").style.display = "block";
            document.getElementById("restOfAddresses").style.display = "none";
        });

        document.getElementById("showAllAddresses").addEventListener("click", function() {
            document.getElementById("popup").style.display = "none";
            document.getElementById("restOfAddresses").style.display = "block";
        });
    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Original source code:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HTML Popup1.png" style="width: 492px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80351i93EC54C64CF28200/image-size/large?v=v2&amp;amp;px=999" role="button" title="HTML Popup1.png" alt="HTML Popup1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HTML Popup.png" style="width: 652px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80350i872063F75C4B11AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="HTML Popup.png" alt="HTML Popup.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 19:44:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1327424#M54510</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-09-11T19:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable link using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1327463#M54514</link>
      <description>&lt;P&gt;As far as I know, you don't have that control over popups in a webmap in ArcGIS Online. You'd have to create your own site using Javascript do to something like that.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 20:44:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1327463#M54514</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-09-11T20:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Show more attributes as a clickable text (react) using Arcade Element</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1327543#M54516</link>
      <description>&lt;P&gt;Sounds good Ken, good to know, it would be great if ESRI adds JS and react capabilities in map viewer (and other apps) itself rather than creating an entire site using ArcGIS SDK for JS for minor changes. Like they can simply add a toggle to modify code option in the app itself.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 23:52:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/show-more-attributes-as-a-clickable-text-react/m-p/1327543#M54516</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-09-11T23:52:10Z</dc:date>
    </item>
  </channel>
</rss>

