The ultimate question I’m asking here is whether it’s possible to do some basic math functions to keep a running total using Shortcuts or Drafts. Here’s the use case I’m trying to solve…
I cover high school sports events in my hometown. For basketball, I use Drafts to keep a running tally of the score. I’d like to automate some of the typing and calculation if I can.
I use this tally to re-create the scoring ebbs and flows after the game when I am writing my story. Here’s what my Drafts document looks like (with a brief description to follow):
2-0 Smith 2
4 Smith 4
6 Jones 2
8 Smith 6
11 Jefferson 3
14 Smith 9
After the game, I can glance at this and see how the game unfolded. Above, the hometown team went ahead 2-0, then the opposing team tied the game 2-2. Then the hometown team scored 12 straight points before the opposing team scored again. (The score is 14-4 at the point where the example stops.)
The hometown team’s scores are not indented. The opposing team’s scores are indented slightly. I note which player scored (only when it’s the hometown team), and keep a running tally of that individual player’s scoring total. (In the example above, Smith has 9 points, Jefferson has 3, and Jones has 2.)
I’ve created a shortcut that adds a new line to a Drafts document each time a team scores, but I wonder if there is a way to have Drafts or Shortcuts to the calculation of the running total by parsing out the previous score. Ideally, I’d love to input that Team A scored 2 points, choose the player who scored from a list, and have that 2 points added to both the running team points total AND the individual player’s scoring total.
Right now, my shortcut asks me how many points were scored, which team scored them, asks me the player name (chosen from a list of players on the home team’s roster), and asks for the NEW point total for the team that scored. Is it possible to use the shortcut or Drafts to make that math happen?