Shortcut - Getting Numeric Input
I made Shortcuts on my Apple iPhone to help me record activities. One of the things that help me make entries easier on an iPhone is getting numeric inputs on a Shortcut.
This is the first in a series:
In the previous article, it discussed displaying a result using the Show Alert shortcut.
This time, we will setup a numeric input and connect it to the alert to display the input.
Get Numeric Input
Start with a clean Shortcuts project and use Add Action to add the “Get Numbers from Input”
Add Action and search for “Get Numeric Input”:
This is how the Shortcut project will look with the Get Numeric Input:
Test out the action by pressing the ▶️ button and enter a value, say 42, this is what the test will look like:
After testing out, the Shortcut screen will have a new section displaying the input.
Add Show Alert
Let’s add the Show Alert to this Shortcut by using the “Search for apps and actions” on the bottom of the screen.
Selecting Show Alert will add it to the Shortcut:
Test out the Shortcut now by pressing the ▶️ button - you will enter a value like before, and an alert will pop up:
Connect Input and Show Alert
To have Show Alert display the value from the numeric input, tap on the “Do you want to continue?” blue text on Show Alert. A keyboard input will pop up with “Select Variable” options:
Tap on “Numbers” and tap “Done”. There should be a vertical line connecting the two sections now. Before, there was no lines connecting them.
Test out the Shortcut now by pressing the ▶️ button - enter a value like before, and an alert will pop up with the value in the alert!
Connecting Shortcut’s numeric input with show alert enables basic numeric input and validating Shortcut receives user result.