I didn't see a paperclip in the original message, so I uploaded it to Google Drive. Hopefully this works.
https://drive.google.com/file/d/1qziupSxVkCmh8VacZDda94TAkDdWfHPB/view?usp=sharing
The idea is that the individual transactions entered on page 1 would total on page 2 based on the category field. Right now its a text field, but I will convert it to a drop down.
Let me know if that makes sense.
Thanks, I understand now. First of all, you should convert the category fields to drop-down, because if the user enters "Bill" instead of "Bills" the sum for the latter won't pick it up... If they can only select from a pre-determined list it's more likely to work correctly.
So let's take that example. Create a total field for Bills on page 2 and apply the following code as its calculation script:
var total = 0;
for (var i=1; i<=28; i++) {
if (this.getField("categoryRow"+i).valueAsString=="Bills")
total+=Number(this.getField("amountRow"+i).valueAsString);
}
event.value = total;
You can easily adjust it for the other fields.