Is there anyway to pass variables from one Shortcut to another? Would like to use a few shortcuts together and I’m not quite sure how I’d pass the information from one to the other - is this possible currently? Or am I looking at making many more mini shortcuts and using the clipboard to pass info back and forth?
Typically you have to work via the clipboard. Apple has not provided another way to deal with this.
However there’s always the chance that if you have a common file store (e.g. Dropbox) and an option to access it, you could pass data via a file rather than the clipboard.
If it helps, using the run shortcut action basically makes them functions and will take the input of the preceding action and pass output to the next.
For example this picture of a shortcut is really two shortcuts put together. The first acts on the input from the share extension, and the passes output into the second which then does something with it.
This allows me to re use these functions without re creating them every time.
A blast from the past that one - I had to download the action to see what it was!
On i*OS13 at least, I do the following:
In your shortcut’s settings, enable the option to show in share sheet.
Go into the share sheet types and select ‘deselect all’.
Come back out to the actions list for your shortcut.
Tap and hold to get your options list for the parameter you want to set - where you had clipboard, current date, and hopefully now you’ll also have another option…
Choose select magic variable.
Scroll to the top of the shortcut and select Shortcut Input as your magic variable and you’re done.
There’s no harm in leaving the accepts in place these days, even if it doesn’t accept anything. It just leaves the shortcut input variable available for selection.
With help of the app Toolbox Pro you can set global variables, that you can use to get data from one Shortcut to another. Also these variables can be synced between your iOS devices. The free version of this app supports this.
I rewrote my script for showing my solar panel production data to read a date from DataJar and created a few new shortcuts that set a date in DataJar and then run this “utility” script: