<?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: count() and sum() functions for repeat in Inbox in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819558#M15437</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would a potential workaround&amp;nbsp; be to&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;add a column that has a default value of "1" within it&lt;/LI&gt;&lt;LI&gt;Use another field that has a once(sum(${Question})) to get a count?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that it could cause issues with the same as you pointed out, but as long as folks do not delete records, then it should work or would it note the deletion and recalculate the sum?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jun 2018 14:51:27 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2018-06-01T14:51:27Z</dc:date>
    <item>
      <title>count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819552#M15431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible for count() and sum() functions to work for ALL repeats reported with a survey, including those previously sent, when revisiting a survey via the Inbox?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 18:22:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819552#M15431</guid>
      <dc:creator>BrentKinal1</dc:creator>
      <dc:date>2018-05-16T18:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819553#M15432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brent,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not currently possible to use the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;count() and sum() functions across all repeat records for the survey. The&amp;nbsp;&lt;SPAN&gt;count() and sum() functions only work across the repeat records&amp;nbsp;related to the same parent record.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;For further analysis of&amp;nbsp;count() and sum() across all repeat records in the same related table, regardless of the parent record, you would need to do this outside of the app.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;Phil.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 05:53:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819553#M15432</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-05-23T05:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819554#M15433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Philip,&amp;nbsp; Thanks for your response, I think I could have worded my question a little bit better. What I had meant was that the count() and sum() functions are not working within&amp;nbsp; the same parent record when used with a repeat. It appears that these functions only work on the repeat records currently on the device, when the parent record is opened via the Inbox it does not count repeated records that were submitted when the record was previously sent . My current form is set up to not include previously submitted related records when brought into the inbox, I haven't had time yet to test by pulling in all of the previously sent repeated&amp;nbsp; records in to the Inbox by setting the bind&amp;nbsp; parameter to "query", I am hoping downloading all the previously sent repeated records will solve the issue. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 18:42:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819554#M15433</guid>
      <dc:creator>BrentKinal1</dc:creator>
      <dc:date>2018-05-23T18:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819555#M15434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brent,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for clarifying, yes you are correct, the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;count() and sum() calculations are only working on the related records that are stored in the local database on the device which is created when new surveys are collected with a new collect, or when surveys are downloaded via the Inbox. These calculations are done locally on the device and do not reference other existing data in the same table stored in the feature service. You will need to use the query parameter to ensure you are downloading all related records to the Inbox for that survey to be able to use&amp;nbsp;&lt;SPAN&gt;count() and sum() calculations with all the available data.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Phil.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 01:11:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819555#M15434</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-05-24T01:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819556#M15435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Philip, just for clarification - you are stating that if we enable the "query" and allowAdds=Yes for all repeats, that the count() and sum() will function correctly based on what is pulled into the Inbox and also for any additional records?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so, then this is great news for some of the surveys that we are going to enable within the next couple of weeks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One additional question about this the count(); can I use it in conjunction with the once() in order to populate a record count field within the repeated records? Something like once(count(${repeatQuestion})), that will then sequentially add a running number to a field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic is that I can use this to create a count for each record that is entered into the repeat for each time that a record is entered. If there is 3 records within a repeat then the count() function would have a value of 3 within all records. What I was thinking is that by using the once() with count() that count would be calculated for each record placing the number of records at that time within the designated field and not hold the total number of records?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 12:44:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819556#M15435</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-05-24T12:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819557#M15436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, if you use&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;query allowAdds=True in the esri parameters column then all the related records in a repeat will be downloaded to the for the parent record. Therefore when you open that&amp;nbsp;survey (parent record), the sum() and count() will be calculating across all those previous and new related records in that survey.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;The use of&amp;nbsp;&lt;SPAN&gt;once() with count()&amp;nbsp; is not supported as you suggest due to the way calculations&amp;nbsp;run when a value is changed or a new repeat add, therefore count will keep incrementing&amp;nbsp;with each new repeat even when once() used.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;Phil.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 May 2018 23:01:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819557#M15436</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-05-27T23:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819558#M15437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would a potential workaround&amp;nbsp; be to&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;add a column that has a default value of "1" within it&lt;/LI&gt;&lt;LI&gt;Use another field that has a once(sum(${Question})) to get a count?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that it could cause issues with the same as you pointed out, but as long as folks do not delete records, then it should work or would it note the deletion and recalculate the sum?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 14:51:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819558#M15437</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-06-01T14:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819559#M15438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;A href="https://community.esri.com/migrated-users/283902"&gt;Philip Wilson&lt;/A&gt;,‌&lt;/P&gt;&lt;P&gt;I also have this problem. I have set the query to allowUpdates but the sum() function for repeats will still not work properly in the Inbox, it works just fine if I open the survey from Sent though. Can you help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Amanda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2019 06:34:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819559#M15438</guid>
      <dc:creator>AmandaSandström2</dc:creator>
      <dc:date>2019-05-20T06:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819560#M15439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amanda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please share you survey xlsx file so we can take a look?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2019 09:28:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819560#M15439</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-05-20T09:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819561#M15440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't find where I can attach the xlsx file. I'll describe what I've tried to do in the survey that fails when I open it from the inbox. I have a repeat for result areas. For every repeat the user should enter which result area it is and since automatic numbering isn't possible yet I've written an if statement that controls the sum of these result areas and if the sum is wrong a note will appear. They can choose between area A, B, C and D but since I want them to choose them in the right order and never choose the same answer more than once I've written this if statement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;if((${sum_result}='A'), 1, if((${sum_result}='AB'), 1,if((${sum_result}='ABC'), 1,if((${sum_result}='ABCD'), 1,if((${sum_result}=''), 1,2)))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the user names the repeats in the wrong order a note will appear. This works fine as long as you don't open the survey from the inbox because for some reason it only seems to sum and count new repeats that you create...&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/447977_survey.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2019 12:23:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819561#M15440</guid>
      <dc:creator>AmandaSandström2</dc:creator>
      <dc:date>2019-05-20T12:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819562#M15441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amanda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you see if the sample attached properly represents the workflow you are trying to implement? &amp;nbsp;It appears to be working properly in this sample. &amp;nbsp;BTW, you can attach files by going into the advanced editor in the comment box.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2019 22:50:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/819562#M15441</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2019-05-21T22:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: count() and sum() functions for repeat in Inbox</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/1173691#M42727</link>
      <description>&lt;P&gt;Hi Phil, sorry for piggy backing on an old post but I'm still experiencing issues with this now. I have a count calculation in my parent record for repeats and when accessing surveys from the inbox it won't take into account those repeat records from previous surveys. If I add new repeat records these are included in the calculation. I have "allUpdates=true query" for all my repeats so I would have expected all repeat records to be included in the calculation. Is this the expected behaviour? Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 13:57:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/count-and-sum-functions-for-repeat-in-inbox/m-p/1173691#M42727</guid>
      <dc:creator>AnthonyJonesRSK</dc:creator>
      <dc:date>2022-05-13T13:57:47Z</dc:date>
    </item>
  </channel>
</rss>

