<?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 Accessing related records in a Feature Report in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1280489#M48738</link>
    <description>&lt;P&gt;I know there is a post on this already that was marked as solved, but that option is not working and that is listed in the post comments &lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/include-related-records-in-feature-report/td-p/1131737" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have set up a set of related tables and a feature service, and I am trying to access all of them in some fashion in a feature report.&lt;/P&gt;&lt;P&gt;I have tried multiple formats, and I have limited success running the feature report on the parent table.&amp;nbsp; However, I need to filter based on the child feature service, and that is where the feature reports do not access the related records.&amp;nbsp; It's like it is only going in one direction....&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Agencies (table, Parent 1:M)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Programs (table, child to Agencies, parent to services, 1:M)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Services (feature service with location geometry, child to programs)&lt;/P&gt;&lt;P&gt;The idea is that an agency can have multiple programs, and each program has multiple services with different locations and attributes associated with each.&lt;/P&gt;&lt;P&gt;I want to create a feature report that shows me the Programs with all of their associated services.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I want to conditionally filter based on an attribute in the Services layer, called Categories.&lt;/P&gt;&lt;P&gt;Essentially, I want to create a report for each service category.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is what is on my template:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;${#HSPrograms}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;${#Services}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Program: ${HSPrograms.PrName}&lt;/U&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Service: ${Service_Name}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;${if Main_Phone}Contact: &lt;/EM&gt;${Main_Phone}${/}&lt;/P&gt;&lt;P&gt;&amp;nbsp;${ServDescrp}&lt;/P&gt;&lt;P&gt;${/}${/}&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2023 20:48:16 GMT</pubDate>
    <dc:creator>Kara_Shindle</dc:creator>
    <dc:date>2023-04-19T20:48:16Z</dc:date>
    <item>
      <title>Accessing related records in a Feature Report</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1280489#M48738</link>
      <description>&lt;P&gt;I know there is a post on this already that was marked as solved, but that option is not working and that is listed in the post comments &lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/include-related-records-in-feature-report/td-p/1131737" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have set up a set of related tables and a feature service, and I am trying to access all of them in some fashion in a feature report.&lt;/P&gt;&lt;P&gt;I have tried multiple formats, and I have limited success running the feature report on the parent table.&amp;nbsp; However, I need to filter based on the child feature service, and that is where the feature reports do not access the related records.&amp;nbsp; It's like it is only going in one direction....&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Agencies (table, Parent 1:M)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Programs (table, child to Agencies, parent to services, 1:M)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Services (feature service with location geometry, child to programs)&lt;/P&gt;&lt;P&gt;The idea is that an agency can have multiple programs, and each program has multiple services with different locations and attributes associated with each.&lt;/P&gt;&lt;P&gt;I want to create a feature report that shows me the Programs with all of their associated services.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I want to conditionally filter based on an attribute in the Services layer, called Categories.&lt;/P&gt;&lt;P&gt;Essentially, I want to create a report for each service category.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is what is on my template:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;${#HSPrograms}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;${#Services}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Program: ${HSPrograms.PrName}&lt;/U&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Service: ${Service_Name}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;${if Main_Phone}Contact: &lt;/EM&gt;${Main_Phone}${/}&lt;/P&gt;&lt;P&gt;&amp;nbsp;${ServDescrp}&lt;/P&gt;&lt;P&gt;${/}${/}&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 20:48:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1280489#M48738</guid>
      <dc:creator>Kara_Shindle</dc:creator>
      <dc:date>2023-04-19T20:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing related records in a Feature Report</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1282144#M48853</link>
      <description>&lt;P&gt;As mentioned in the &lt;A href="https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereportqueries.htm#ESRI_SECTION1_34D03ABEE83B49CE82B0B1D8FDCE04D1" target="_self"&gt;Additional Syntax section&lt;/A&gt; of the report query documentation, you can use a where clause in the repeat tag to limit the repeat records that are printed in a repeat section.&lt;/P&gt;&lt;PRE&gt;${#Services | where="Categories='Cat1'"} &lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Apr 2023 21:45:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1282144#M48853</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2023-04-24T21:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing related records in a Feature Report</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1282261#M48862</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1213"&gt;@JamesTedrick&lt;/a&gt;&amp;nbsp; thank you for your response.&lt;/P&gt;&lt;P&gt;I've tried that and had several issues with the queries.&amp;nbsp; If I try and add the template on my services, it will tell me the related tables are undefined.&amp;nbsp; I also will then get an error that the field I am trying to use a where clause on does not support operation.&lt;/P&gt;&lt;P&gt;Perhaps you can tell me if my syntax is wrong?&lt;/P&gt;&lt;P&gt;I am trying to only show programs with services that are in category '3'.&amp;nbsp; I've built a table that shows the services listed under each program.&amp;nbsp; My template is attached.&amp;nbsp; I've been running this template on the services survey - should I be running it on one of the related tables instead?&amp;nbsp; The category field is an integer with a domain associated with it, which I thought was causing me some issues with the where clause and I was planning to test it out on a new string field.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: Error I receive when I try to use the where clause.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="feature report error.png" style="width: 823px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/69015iDBF45DA7CA0CB1F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="feature report error.png" alt="feature report error.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 18:34:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1282261#M48862</guid>
      <dc:creator>Kara_Shindle</dc:creator>
      <dc:date>2023-04-25T18:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing related records in a Feature Report</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1282582#M48880</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/228958"&gt;@Kara_Shindle&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;The where clause should be applies at the repeat tag ${Services} , not an individual field - the where clause sub-selects features form the repeat.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 22:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1282582#M48880</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2023-04-25T22:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing related records in a Feature Report</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1316511#M51069</link>
      <description>&lt;P&gt;Thank you for your response - sorry for the delay in my reply.&amp;nbsp; I was able to apply it at the ${Services} repeat tag when I was running my report on a first child related table, but then all programs were still listed - most just blank because they didn't have a service with the matching category.&amp;nbsp; I attached the output.&amp;nbsp; I'd really love it it would then only display the programs who have related services within this category.&amp;nbsp; I tried running this template on my services related table (great-grandparent? related table) and it then says that the parent tables are undefined.&amp;nbsp; I updated my template and attached it as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 16:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1316511#M51069</guid>
      <dc:creator>Kara_Shindle</dc:creator>
      <dc:date>2023-08-08T16:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing related records in a Feature Report</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1354289#M53102</link>
      <description>&lt;P&gt;As an update, I did get the where clause to apply at the repeat tag ${Services} but I am still running into an issue where it is showing the parent records, just with no child records.&amp;nbsp; So I'll get every single parent record when I run the template, but only those that fit my conditional statement will populate with the child fields I need.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still working on this!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 20:00:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/accessing-related-records-in-a-feature-report/m-p/1354289#M53102</guid>
      <dc:creator>Kara_Shindle</dc:creator>
      <dc:date>2023-11-28T20:00:23Z</dc:date>
    </item>
  </channel>
</rss>

