<?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: Related table data view in popup in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268928#M50956</link>
    <description>&lt;P&gt;Hi Barry,&lt;/P&gt;&lt;P&gt;I had this issue and hope to provide some insight with my code. The goal was to create a chart which referenced my related table data ("ADT_Data_Merge") with the related road ($feature.MRNLINKID). I created the related table between the ADT Data and MRNLINKID on Pro, but ended up needing to switch to creating a relationship class in order to export my map/relationship to AGOL map. Hope this helps a bit.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;		// Set variable to MRNLINK IDS
		var Road = $feature.MRNLINKID
		// Set variable to related table (notice FeatureSetByRelationshipName)
		var Table = FeatureSetByRelationshipName($feature, "ADT_Data_Merge", ['Mean_ADT', 'Year'], false)
		// filter through table, matching the table's STATIONID with road variable)
		var AADT = OrderBy(Filter(Table, 'StationID = @Road'), 'Year')
		// this was copied and pasted from AGO community post, I only changed certain variables
		var chartValues = {}
		var chartNames = []
		for (var f in AADT) {
		        chartValues[Text(f.Year,'0000')] = Text(f.Mean_ADT,'###,###')
		        Push(chartNames, f.Year)
		    }
		return {
		    type: 'media',
		    title : 'AADT by Year',
		    description : 'Annual average daily traffic by year for this road',
		    attributes : chartValues,  // replace this dictionary with your own key-value pairs,
		    mediaInfos: [{
		        type : 'linechart', //linechart | barchart | piechart | columnchart
		        //title : '',
		        //caption : '',
		        altText : 'line chart showing traffic counts by year', //altText will be read by screen readers
		        value : {
		          fields: chartNames,  // choose what attributes to use in the chart
		          //normalizeField : '',  // the name of the attribute to normalize by or value 
		        }	  
		      }]
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2023 13:06:29 GMT</pubDate>
    <dc:creator>bsklaohfl</dc:creator>
    <dc:date>2023-03-17T13:06:29Z</dc:date>
    <item>
      <title>Related table data view in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268515#M50937</link>
      <description>&lt;P&gt;Is it yet possible to publish a map service with a related table to AGOL, and view the related table data in a web map popup?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 14:24:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268515#M50937</guid>
      <dc:creator>BarryG</dc:creator>
      <dc:date>2023-03-16T14:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Related table data view in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268550#M50939</link>
      <description>&lt;P&gt;You can use &lt;STRONG&gt;Arcade&lt;/STRONG&gt; to grab the attributes easily enough using the &lt;STRONG&gt;FeatureSetByRelationshipName&lt;/STRONG&gt; function.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 15:49:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268550#M50939</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-03-16T15:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Related table data view in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268603#M50943</link>
      <description>&lt;P&gt;Josh, I tried following that process but still did not display the related table info, but only the field name and object Object.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 17:05:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268603#M50943</guid>
      <dc:creator>BarryG</dc:creator>
      <dc:date>2023-03-16T17:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Related table data view in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268606#M50944</link>
      <description>&lt;P&gt;Well, once you have your FeatureSet, you need to grab individual features and work with them.&lt;/P&gt;&lt;PRE&gt;for (var feat in featureset) {&lt;BR /&gt;    // do something here&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;Are you trying to get a single attribute from the related features? If there are multiple related features, how will you choose which to get?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 17:07:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268606#M50944</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-03-16T17:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Related table data view in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268928#M50956</link>
      <description>&lt;P&gt;Hi Barry,&lt;/P&gt;&lt;P&gt;I had this issue and hope to provide some insight with my code. The goal was to create a chart which referenced my related table data ("ADT_Data_Merge") with the related road ($feature.MRNLINKID). I created the related table between the ADT Data and MRNLINKID on Pro, but ended up needing to switch to creating a relationship class in order to export my map/relationship to AGOL map. Hope this helps a bit.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;		// Set variable to MRNLINK IDS
		var Road = $feature.MRNLINKID
		// Set variable to related table (notice FeatureSetByRelationshipName)
		var Table = FeatureSetByRelationshipName($feature, "ADT_Data_Merge", ['Mean_ADT', 'Year'], false)
		// filter through table, matching the table's STATIONID with road variable)
		var AADT = OrderBy(Filter(Table, 'StationID = @Road'), 'Year')
		// this was copied and pasted from AGO community post, I only changed certain variables
		var chartValues = {}
		var chartNames = []
		for (var f in AADT) {
		        chartValues[Text(f.Year,'0000')] = Text(f.Mean_ADT,'###,###')
		        Push(chartNames, f.Year)
		    }
		return {
		    type: 'media',
		    title : 'AADT by Year',
		    description : 'Annual average daily traffic by year for this road',
		    attributes : chartValues,  // replace this dictionary with your own key-value pairs,
		    mediaInfos: [{
		        type : 'linechart', //linechart | barchart | piechart | columnchart
		        //title : '',
		        //caption : '',
		        altText : 'line chart showing traffic counts by year', //altText will be read by screen readers
		        value : {
		          fields: chartNames,  // choose what attributes to use in the chart
		          //normalizeField : '',  // the name of the attribute to normalize by or value 
		        }	  
		      }]
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 13:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1268928#M50956</guid>
      <dc:creator>bsklaohfl</dc:creator>
      <dc:date>2023-03-17T13:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Related table data view in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1270523#M51015</link>
      <description>&lt;P&gt;Thank you folks.&amp;nbsp; I have decided to instead create a model that will update values in a feature class from the table instead, as we have the identical fields already in the feature class.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 17:39:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1270523#M51015</guid>
      <dc:creator>BarryG</dc:creator>
      <dc:date>2023-03-22T17:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Related table data view in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1271563#M51074</link>
      <description>&lt;P&gt;See posted solution here also:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/display-related-records-in-a-popup-in-a-nice-table/m-p/1271482#M51069" target="_blank"&gt;https://community.esri.com/t5/arcgis-online-questions/display-related-records-in-a-popup-in-a-nice-table/m-p/1271482#M51069&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 21:17:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1271563#M51074</guid>
      <dc:creator>NorthSouthGIS</dc:creator>
      <dc:date>2023-03-24T21:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Related table data view in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1271564#M51075</link>
      <description>&lt;P&gt;You can have a scheduled notebook run your model as a python script routinely in AGOL or enterprise&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 21:17:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/related-table-data-view-in-popup/m-p/1271564#M51075</guid>
      <dc:creator>NorthSouthGIS</dc:creator>
      <dc:date>2023-03-24T21:17:48Z</dc:date>
    </item>
  </channel>
</rss>

