Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Rabid-Otter

macrumors newbie
Original poster
Feb 19, 2024
2
0
Hello World!

First and foremost I am not a programmer. That said, I have searched high and low for similar solution examples and haven’t made much progress. Here is what I am attempting to do, any suggestions are appreciated.

Overview:
Shortcut that helps facilitate taking attendance for several sources, calculating total, and sending the summary/results via text.

1. I have attempted to use “Ask for” [number] (for multiple inputs)

2. Attempted to use “Calculate” [sum].

3. Attempted to use “Send to” [text message].

Problem I face is getting the input of serval numbers to sum. I have saved the input to a txt file and tried to calculate the sum from the txt file without success. Maybe I am going about it all wrong?

Here is what I foresee the Shortcut doing:

1. Prompt user “Hall attendance 1?” Input #

2. Prompt user “Hall attendance 2?” Input #

3. Prompt user “Remote attendance 1?” Input #

4. Prompt user “Remote attendance 2?” Input #

5. Sum #1&2

6. Sum #3&4

7. Send to via text the summary results.

Thanks in advance for any suggestions or links to resources.
 

DarkPremiumCho

macrumors 6502
Mar 2, 2023
276
177
Shortcuts is the dumbest app I've seen in this decade. The baby smartphones Steve Jobs criticized in his 2007 Macworld keynote are easier to use. It's so dumb that I am not sure I can convey the idea behind the steps in a textual way to you!

Any way, what you should do is roughly these:

  1. Add "Get number from input", set the prompt of that input to Hall 1 or the text you prefer
  2. Add another "Get number from input", set the prompt of that input to Hall 2 or the text you prefer
  3. Add "Calculate the expression", set the expression to "number + number". Tap the blue number, you may set the variable name to Hall1 and Hall2 respectively, to make them more intuitive.
  4. Add "Set variable", name this variable hallSum.
  5. Add "Append to text file", append hallSum to Shortcuts, with the path being summary.txt and use a new line.
  6. Repeat for your Remote attendance: get 2 numbers, calculate the sum, set another variable called remoteSum, and append to the same summary.txt file
  7. Execute the shortcut, you will see the result in your iCloud Drive/Shortcuts/summary.txt

p.s. I am not in an English environment. Part of the description above is not verbatim text but a translation. And you might want to elaborate on your step 7 so the community can offer better help.
 
  • Like
Reactions: Rabid-Otter

Rabid-Otter

macrumors newbie
Original poster
Feb 19, 2024
2
0
Thank you DarkPremiumCho! With your feedback/input I was able to get it to work. I changed it up slightly, instead of putting the output to a .txt file I used “Send to” to text the calculated output. I appreciate you!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.