Use the Choose from Menu action in Shortcuts
The Choose from Menu action gives you the ability to decide what a shortcut should do when it’s run. You choose from a predefined list of options to have each option run a different series of actions. This allows shortcuts to maintain their rigid structure but remain flexible (depending on the realtime context).
Whereas the Choose from List action presents a list of items to pick from when you run a shortcut (such as an image or a song name), the Choose from Menu action presents a list of options, making it possible for the shortcut to do different things depending on what you choose when you run the shortcut. Think of the Choose from Menu action as creating a fork in the road of your shortcut—the shortcut is sent in a different direction depending on the chosen option, resulting in a unique behavior.
Each menu option in the Choose from Menu action has a corresponding marker—a tag below the Choose from Menu action in the shortcut editor; each marker represents a different pathway the shortcut may take at that point. Place the actions that you want the shortcut to perform under the marker for a specific menu choice. For example, if you add a Choose from Menu action with two options—”Nice to meet you” and “Great catching up”—you could add a Text action under the “Nice to meet you” marker and enter the text string, “It was great meeting you today!” When you run the shortcut, choosing “Nice to meet you” passes the text string “It was great meeting you today!” out of the Choose from Menu action into the next action in your shortcut.
Megjegyzés: Bár előfordulhat, hogy lát egy vonalat a képernyő közepén, amely összeköti az egyes műveleteket, a parancs figyelmen kívül hagyja a nem kijelölt lehetőségek műveleteit. A Kiválasztás menüből művelettel kiválaszthat egyetlen lehetőséget, és ez a kiválasztás meghatározza, milyen műveletek használhatók.
Tipp: You can also use variables in the names of each menu option to make them dynamic. Például hozzáadhatja az Aktuális dátum változót a fenti „Jó, hogy találkoztunk” lehetőséghez. When you run the shortcut and choose “Great catching up,” the current date is automatically added.