<?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 Popup generating console(), but not actual popup? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/popup-generating-console-but-not-actual-popup/m-p/1604349#M94793</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am attempting to format a pop-up using arcade in ArcGIS Pro 3.4.2 to return results from a related table. The use case is to create a popup of Permits on an Address.&lt;/P&gt;&lt;P&gt;Feature Layer = MasterAddress&lt;/P&gt;&lt;P&gt;Table = test_EnerGovProd_PERMITS&lt;/P&gt;&lt;P&gt;There is a 1:M relationship that is returning results.&lt;/P&gt;&lt;P&gt;Results as shown below:&lt;/P&gt;&lt;P&gt;ArcPro Relate:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amarz_0-1744226101679.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129826i9CD8841EBFB0D264/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amarz_0-1744226101679.png" alt="Amarz_0-1744226101679.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Arcade Script Console from MasterAddress Popup&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amarz_1-1744226488982.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129829iEB0583C7EC61443E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amarz_1-1744226488982.png" alt="Amarz_1-1744226488982.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Actual ArcPro Popup:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amarz_3-1744226612103.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129831i094B5A0D8DCF26AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amarz_3-1744226612103.png" alt="Amarz_3-1744226612103.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;ArcPro PopUp Script:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Reference the permits table (double-check the name matches in the map)
var permits = FeatureSetByName($datastore, "test_EnergovProd_PERMITS", ["MAIN_ADDRESS_LINE1", "PERMIT_NUMBER"], false);

// Check if permits table loaded correctly
if (IsEmpty(permits)) {
    return "Permit table not found.";
}

// Get this feature's full address
var address = Upper(Trim($feature.Address_Full))
console("address: " + address)

// Filter permits where MAIN_ADDRESS_LINE1 matches the address
var relatedPermits = Filter(permits, 'MAIN_ADDRESS_LINE1 = @address');

// Initialize an array to hold permit numbers
var permitList = [];

// Loop through matching permits and add to array
for (var p in relatedPermits) {
    Push(permitList, p.PERMIT_NUMBER);
    Push(permitList, p.MAIN_ADDRESS_LINE1);
}
console("relatedPermit: " + Count(relatedPermits))
//console("relatedPermit: " + relatedPermits.MAIN_ADDRESS_LINE1)
console("permitList: " + permitList)

// If permits were found, return as comma-separated string
if (Count(permitList) &amp;gt; 0) {
    return Concatenate(permitList, TextFormatting.NewLine);
}
// If no permits found, still return a string
return "No permits found";&lt;/LI-CODE&gt;&lt;P&gt;Any help in why the popup is not returning any values, would be apprecaited.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Apr 2025 19:24:51 GMT</pubDate>
    <dc:creator>Amarz</dc:creator>
    <dc:date>2025-04-09T19:24:51Z</dc:date>
    <item>
      <title>Popup generating console(), but not actual popup?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/popup-generating-console-but-not-actual-popup/m-p/1604349#M94793</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am attempting to format a pop-up using arcade in ArcGIS Pro 3.4.2 to return results from a related table. The use case is to create a popup of Permits on an Address.&lt;/P&gt;&lt;P&gt;Feature Layer = MasterAddress&lt;/P&gt;&lt;P&gt;Table = test_EnerGovProd_PERMITS&lt;/P&gt;&lt;P&gt;There is a 1:M relationship that is returning results.&lt;/P&gt;&lt;P&gt;Results as shown below:&lt;/P&gt;&lt;P&gt;ArcPro Relate:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amarz_0-1744226101679.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129826i9CD8841EBFB0D264/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amarz_0-1744226101679.png" alt="Amarz_0-1744226101679.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Arcade Script Console from MasterAddress Popup&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amarz_1-1744226488982.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129829iEB0583C7EC61443E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amarz_1-1744226488982.png" alt="Amarz_1-1744226488982.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Actual ArcPro Popup:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amarz_3-1744226612103.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129831i094B5A0D8DCF26AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amarz_3-1744226612103.png" alt="Amarz_3-1744226612103.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;ArcPro PopUp Script:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Reference the permits table (double-check the name matches in the map)
var permits = FeatureSetByName($datastore, "test_EnergovProd_PERMITS", ["MAIN_ADDRESS_LINE1", "PERMIT_NUMBER"], false);

// Check if permits table loaded correctly
if (IsEmpty(permits)) {
    return "Permit table not found.";
}

// Get this feature's full address
var address = Upper(Trim($feature.Address_Full))
console("address: " + address)

// Filter permits where MAIN_ADDRESS_LINE1 matches the address
var relatedPermits = Filter(permits, 'MAIN_ADDRESS_LINE1 = @address');

// Initialize an array to hold permit numbers
var permitList = [];

// Loop through matching permits and add to array
for (var p in relatedPermits) {
    Push(permitList, p.PERMIT_NUMBER);
    Push(permitList, p.MAIN_ADDRESS_LINE1);
}
console("relatedPermit: " + Count(relatedPermits))
//console("relatedPermit: " + relatedPermits.MAIN_ADDRESS_LINE1)
console("permitList: " + permitList)

// If permits were found, return as comma-separated string
if (Count(permitList) &amp;gt; 0) {
    return Concatenate(permitList, TextFormatting.NewLine);
}
// If no permits found, still return a string
return "No permits found";&lt;/LI-CODE&gt;&lt;P&gt;Any help in why the popup is not returning any values, would be apprecaited.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 19:24:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/popup-generating-console-but-not-actual-popup/m-p/1604349#M94793</guid>
      <dc:creator>Amarz</dc:creator>
      <dc:date>2025-04-09T19:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Popup generating console(), but not actual popup?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/popup-generating-console-but-not-actual-popup/m-p/1604842#M94835</link>
      <description>&lt;P&gt;I have also attempted to use the following with the same result.. I am getting a console return, but nothing in the actual popup..&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var related_table = FeatureSetByName($datastore, "test_EnergovProd_PERMITS", ["MAIN_ADDRESS_LINE1", "PERMIT_NUMBER"], false);

var filter_query = "MAIN_ADDRESS_LINE1= '" + $feature["Address_Full"] + "'";

var related_data_filtered = Filter(related_table, filter_query);

var related_data_filtered_count = Count(related_data_filtered);

var output = []

if (related_data_filtered_count &amp;gt; 0) {
  for (var related_data_row in related_data_filtered) {
    Push(output, related_data_row.PERMIT_NUMBER)
  }
} else {
  return "No Related Records."
}
console (related_data_row)
return Concatenate(output, ', ')&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 10 Apr 2025 17:09:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/popup-generating-console-but-not-actual-popup/m-p/1604842#M94835</guid>
      <dc:creator>Amarz</dc:creator>
      <dc:date>2025-04-10T17:09:26Z</dc:date>
    </item>
  </channel>
</rss>

