
I have a sheet value that would be the sum of a column in a repeating field and have gotten as far as realizing I need to do this with a Sheet Worker Script but the wiki page and examples are leaving me kind of lost. I'd appreciate either feedback or pointer to a simple example I could follow. What I have is the following repeating fields and I want to sum the total of the INJURY_LEVEL from the following fieldset and keep the result in an input field on the sheet called INJURY_TOTAL <fieldset class="repeating_injury">
<div>
<input type="text" name="attr_INURY_LOCATION" class="sheet-skill-label">
<select name="attr_INJURY_SEVERITY" class="sheet-skill-value">
<option value="M">M</option>
<option value="S">S</option>
<option value="G">G</option>
<option value="K">K</option>
</select>
<input type="number" name="attr_INJURY_LEVEL" class="sheet-skill-value">
<input type="number" name="attr_INJURY_HEALINGROLL" class="sheet-skill-value">
<div class="sheet-check-col">
<input type="checkbox" name="attr_INFECTED" value="1" checked="false">
</div>
</div>
</fieldset> the field I want to update is: <input type="number" name="attr_INJURY_TOTAL"> The best I can get now is knowing I should do a Sheet Worker on change and remove but how the examples I'm seeing, particularly on iterating over the IDs are really leaving me confused. Thanks in advance for any help.