Howdy folks,
This is kind of hard to explain, but I'm going to do my best. Also, my apologies if this isn't the right board for this.
My predecessor set up a survey in Survey123 to help manage fire inspections, and as part of that, we have some word documents set up to generate a report to provide to our inspectors and "inspectees" after we finish an inspection. There are three options for each section of the inspection-- Pass (0), Fail (1), or Repaired (2). Repaired is used when something used to be a Fail but has passed reinspection.
We have some coding in the document report to add up the number of violations, but it is currently adding the "Repaired" items along with the "Failed"-- we only want it to add the Failed items. How would I change the coding in the report to only add up the Fail responses in the number of violations?
Thank you in advance for any advice or instruction!
EDIT: The excel file has now been attached.
I don't think the report template itself can do math and I am not seeing anything in what you provided that suggests the math is happening there. Can your share an example of your xlsx, so we can see the calculation for the number of failed inspections. It appears there is a field in the form, maybe hidden from the form itself, that makes that calculation.
So are you saying that you are certain the ${numberofviolationnotes} variable is a field in a feature class that is populated/calculated by a Survey123 form? Do you have access to the Survey123 design? Do you know if it was made using Survey123 Connect, or just the standard AGOL Survey123 design tools?