Need help adding votes from custom state

Hey friends!

I’m trying to make a visual quiz, where users click on their favorite pictures. I’m displaying pictures in a repeating group:

Here is how the data for the images is structured:

When they click (favorite) a picture, it’s added to a custom state (state=voted).

Each user has a style field with an associated number.
Screen Shot 2021-04-09 at 9.57.49 AM

The end goal is to get each image’s style to add +1 to the user’s correlated style field.

Right now, I can do that by creating a “vote” each time an image is clicked, and having that vote added to the user’s correlating style field.

Screen Shot 2021-04-09 at 9.59.01 AM

However, I’d like to not be pinging the database every time an image is clicked.

I tried to create a “submit” button at the end of the image repeating group that would tally all of the votes at once, but I can’t get that to work.

Here is my current workaround, where it pings the database for every vote. Screen Shot 2021-04-09 at 10.01.01 AM

And here is where I’m adding the votes to the user after they click submit.
Screen Shot 2021-04-09 at 10.00.28 AM

Again - the issue I’m having is I can’t figure out how to create new votes from a custom state, so that all of the votes are coming in at once and not consistently reaching out to the database.

Thanks for any help!