<?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: Adding repeat query to if statement in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/adding-repeat-query-to-if-statement/m-p/1675840#M65085</link>
    <description>&lt;P&gt;Is there documentation on the &lt;EM&gt;assign&lt;/EM&gt; parameter?&amp;nbsp; I was not aware that was a thing and do not see any references here:&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereportqueries.htm" target="_blank"&gt;Report queries—ArcGIS Survey123 | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jan 2026 13:12:45 GMT</pubDate>
    <dc:creator>TL2</dc:creator>
    <dc:date>2026-01-05T13:12:45Z</dc:date>
    <item>
      <title>Adding repeat query to if statement</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/adding-repeat-query-to-if-statement/m-p/1675467#M65063</link>
      <description>&lt;P&gt;I have an if statement below that produces a "Yes".&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;${if (1&amp;gt;=0)} Yes${/}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a query statement below that produces a "1".&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;${Inspection | where:"status='Deficient'" | stats:"count, q_2"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am unable to place the query inside the if statement without getting errors - mostly unclosed or unopened.&lt;/P&gt;&lt;P&gt;How do I combine the two?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 17:49:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/adding-repeat-query-to-if-statement/m-p/1675467#M65063</guid>
      <dc:creator>TL2</dc:creator>
      <dc:date>2025-12-31T17:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding repeat query to if statement</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/adding-repeat-query-to-if-statement/m-p/1675521#M65067</link>
      <description>&lt;P&gt;In Survey123 report templates you can’t nest a where | stats query inside an if statement because queries are evaluated separately, which causes parsing errors. Instead, run the query first, assign the result to a variable, and then use that variable in the if condition, like this:&lt;BR /&gt;&lt;BR /&gt;${Inspection | where:"status='Deficient'" | stats:"count" | assign:"defCount"}&lt;BR /&gt;${if defCount &amp;gt; 0}Yes${/}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 22:56:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/adding-repeat-query-to-if-statement/m-p/1675521#M65067</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2025-12-31T22:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding repeat query to if statement</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/adding-repeat-query-to-if-statement/m-p/1675840#M65085</link>
      <description>&lt;P&gt;Is there documentation on the &lt;EM&gt;assign&lt;/EM&gt; parameter?&amp;nbsp; I was not aware that was a thing and do not see any references here:&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereportqueries.htm" target="_blank"&gt;Report queries—ArcGIS Survey123 | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2026 13:12:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/adding-repeat-query-to-if-statement/m-p/1675840#M65085</guid>
      <dc:creator>TL2</dc:creator>
      <dc:date>2026-01-05T13:12:45Z</dc:date>
    </item>
  </channel>
</rss>

