<?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>idea Survey123 - URL Parameters/Populate Attributes from Related Table 1:M Relationships in ArcGIS Survey123 Ideas</title>
    <link>https://community.esri.com/t5/arcgis-survey123-ideas/survey123-url-parameters-populate-attributes-from/idi-p/932807</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;When opening a survey&amp;nbsp;by selecting a feature from a&amp;nbsp;web app&amp;nbsp;and&amp;nbsp;populating attributes of the selected feature within the survey, I would like to populate attributes of a feature that has a&amp;nbsp;relationship/related table to the feature that is selected.&amp;nbsp; In example shown below, I would like to&amp;nbsp;populate attributes not only from the pole (selected feature), but from the OH switch as well, such as facility ID, phase, voltage, etc. &lt;STRONG&gt;&lt;EM&gt;even&lt;/EM&gt;&lt;/STRONG&gt; if feature has a 1:M relationship. I would like to do this with minimal coding involved. This will be very valuable for field crews doing inspections as there will be less room for error as well as a huge time saver while collecting info on the assets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;I had submitted this as a question previously and came to conclusion is not working due to the 1:M relationship. Maybe there is a way to make it work?&amp;nbsp; This is code i used:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: none windowtext 1.0pt; padding: 0in; color: navy; background: white; font-size: 11.5pt;"&gt;&lt;EM&gt;arcgis-survey123://?itemID=&lt;/EM&gt;&lt;/SPAN&gt;c910f2c47e8a4af1a74c85a80807bacb&amp;amp;field:pole_number={FACILITYID}&amp;amp;field:oh_switch_number={relationships/3/FACILITYID}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;Thanks for consideration,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;Elizabeth&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;&lt;IMG __jive_id="475905" alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/475905_opensurvey.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt; background: white;"&gt;&lt;IMG __jive_id="475992" alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/475992_popattribute.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Dec 2019 22:38:14 GMT</pubDate>
    <dc:creator>ElizabethHovsepian</dc:creator>
    <dc:date>2019-12-11T22:38:14Z</dc:date>
    <item>
      <title>Survey123 - URL Parameters/Populate Attributes from Related Table 1:M Relationships</title>
      <link>https://community.esri.com/t5/arcgis-survey123-ideas/survey123-url-parameters-populate-attributes-from/idi-p/932807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;When opening a survey&amp;nbsp;by selecting a feature from a&amp;nbsp;web app&amp;nbsp;and&amp;nbsp;populating attributes of the selected feature within the survey, I would like to populate attributes of a feature that has a&amp;nbsp;relationship/related table to the feature that is selected.&amp;nbsp; In example shown below, I would like to&amp;nbsp;populate attributes not only from the pole (selected feature), but from the OH switch as well, such as facility ID, phase, voltage, etc. &lt;STRONG&gt;&lt;EM&gt;even&lt;/EM&gt;&lt;/STRONG&gt; if feature has a 1:M relationship. I would like to do this with minimal coding involved. This will be very valuable for field crews doing inspections as there will be less room for error as well as a huge time saver while collecting info on the assets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;I had submitted this as a question previously and came to conclusion is not working due to the 1:M relationship. Maybe there is a way to make it work?&amp;nbsp; This is code i used:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: none windowtext 1.0pt; padding: 0in; color: navy; background: white; font-size: 11.5pt;"&gt;&lt;EM&gt;arcgis-survey123://?itemID=&lt;/EM&gt;&lt;/SPAN&gt;c910f2c47e8a4af1a74c85a80807bacb&amp;amp;field:pole_number={FACILITYID}&amp;amp;field:oh_switch_number={relationships/3/FACILITYID}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;Thanks for consideration,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;Elizabeth&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #3d3d3d;"&gt;&lt;IMG __jive_id="475905" alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/475905_opensurvey.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt; background: white;"&gt;&lt;IMG __jive_id="475992" alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/475992_popattribute.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2019 22:38:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-ideas/survey123-url-parameters-populate-attributes-from/idi-p/932807</guid>
      <dc:creator>ElizabethHovsepian</dc:creator>
      <dc:date>2019-12-11T22:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 - URL Parameters/Populate Attributes from Related Table 1:M Relationships</title>
      <link>https://community.esri.com/t5/arcgis-survey123-ideas/survey123-url-parameters-populate-attributes-from/idc-p/932808#M387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to create a view on your gdb that would add some columns to your parent table from the related table.&amp;nbsp; We have this setup for some symbology on a webmap that we feed into Collector.&amp;nbsp; The features are the parent table, and there is a related inspections table.&amp;nbsp; Our SQL statement pulls the most recent inspection (lastprocessed) and determines how long ago it was (dayssincelastprocessed) and adds that number of days into the view's extra columns.&amp;nbsp; I bet you could do the same thing in this situation but just pull the first record in the related table.&amp;nbsp; You'd then publish the view as a feature service and feed it into your map.&amp;nbsp; I'm not super good with SQL but maybe this could give a launch point:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two columns added to the end of the parent table as a view:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/476230_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQL statement we're using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a.*,&lt;BR /&gt;(SELECT max(b.inspectiondate) FROM CriticalFacilitiesInspectionsTable_evw AS b&lt;BR /&gt;WHERE a.facilityid=b.facilityid) AS lastprocessed,&lt;BR /&gt;DATEDIFF(day,(SELECT max(b.inspectiondate) FROM CriticalFacilitiesInspectionsTable_evw AS b&lt;BR /&gt;WHERE a.facilityid=b.facilityid), GETDATE()) AS DaysSinceLastProcessed&lt;BR /&gt;FROM ssgravitymain_evw AS a&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2019 23:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-ideas/survey123-url-parameters-populate-attributes-from/idc-p/932808#M387</guid>
      <dc:creator>DavidForbuss1</dc:creator>
      <dc:date>2019-12-13T23:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 - URL Parameters/Populate Attributes from Related Table 1:M Relationships</title>
      <link>https://community.esri.com/t5/arcgis-survey123-ideas/survey123-url-parameters-populate-attributes-from/idc-p/932809#M388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your suggestions.&amp;nbsp; I don't have much experience in sql either.&amp;nbsp; Hopefully, one day, this idea may come to fruition without much user programming involved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Elizabeth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 19:06:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-ideas/survey123-url-parameters-populate-attributes-from/idc-p/932809#M388</guid>
      <dc:creator>ElizabethHovsepian</dc:creator>
      <dc:date>2020-02-07T19:06:42Z</dc:date>
    </item>
  </channel>
</rss>

