I have employee hours inside a repeat and a sum outside the repeat. That part is working.
I want a running total calculated for the total employee hours for the project in Survey123 or via a feature report.
I'm noticing that Survey123 can keep a sum running as long as the survey is open, but once the survey is closed and reopened, the sum starts over. I also read a post that says something similar.
I've looked into aggregate functions in the summary feature report, but it's not working for me yet.
I've attached my survey and a photo of how I'd like it to work. I would love a fresh set of eyes.
You can save a lot of headaches by moving your post-processing outside of the survey form. All the most difficult surveys I've come across have been when the entire solution logic has been inserted into the survey form. The others are when one survey submission is used for an entire project when it was better served as several instances of 'collect > submit'.
Were you planning on using the inbox? Download and add new records? Issue with the Sum calculating previous repeat values that aren't getting downloaded?
Or is the survey saved as a draft and you're finding that it's not calculating the sum when Survey123 is closed/opened? Again, preference would be that data is collected when relevant - not having days or weeks of data stored on a single offline device.
Without fully comprehending your survey or workflow, an alternative approach could be:
If you're using inbox and want a running total, you may be able to use the pulldata(@layer) expression to get output statistics Sum for the layer fields. However you'd need to be online and add the current value in the survey. Take a look at the sample survey in Connect
You could also achieve similar with JavaScript. Both seem technical and have limitations.
If you're using drafts to store all that data and the sums aren't working on reopening, it sounds like a known defect? And I'd reconsider your approach altogether per the earlier comment of all data on one device.
Also, you can use yes_no for several questions. Don't need to create a second list for the same values.