
Use If actions in Shortcuts
Use the If action (also known as a conditional) to set up a shortcut that checks for certain conditions and operates differently depending on which condition is met. A Ha műveletek biztosítják azt a rugalmasságot, hogy a műveletek különböző utakon folytatódhatnak a feltételektől függően, amelyek csak a parancs futásakor lesznek ismertek.
Simply put, the If action lets you express the following in a shortcut: Ha egy feltétel igaz, akkor tegye ezt; különben pedig tegye ezt. Minden eredményhez egy másik parancssorozat fut le.
You can use the If action to test whether content that’s passed into the action as input meets a certain condition. Például a Ha művelet használatával ellenőrizheti, hogy egy előző műveletből beolvasott weboldal tartalmazza-e a „fasírt” szót.
Megjegyzés: Ha nem ismeri a bemenet és kimenet fogalmát, akkor tekintse meg a következőt: Hogyan működnek a parancsok?

Miután elhelyezte a parancsot, a Ha művelet tartalmazni fog három jelölőt (címkét a parancsszerkesztőben): Ha (nem látható külön címkeként), Egyébként és Ha vége.
Within the If marker, you can configure the Input and Value parameters. Tap the Input parameter to choose one of the four available conditions:
Egyenlő: Tests if the input is an exact match to the value you’ve specified, whether text or a number.
Tartalmazza: Tests if the input (which may be a body of text or a list) contains text you’ve specified at least once.
Nagyobb, mint: Tests if the input is greater than a certain number.
Kisebb, mint: Tests if the input is less than a certain number.
A Nagyobb mint és a Kisebb mint csak akkor van alkalmazva, ha a bemenet szám.
Because the If action has two possible outcomes—the condition is true or the condition is false—you can place actions in two paths. When the shortcut runs, a true condition causes the input to be passed to the first action just after If, while a false condition causes the input to be passed into the first action after the Otherwise marker.

A Ha esetben vagy Egyébként esetben utolsóként kimenetet visszaadó művelet kimenetként átadja a tartalmát Befejezés, ha jelölőn keresztül (beolvasható „Ha művelet eredménye” Magic-változóként). This means that the last action in each path of the If action affects the output of the action as a whole.
Tipp: You can place If actions within each other to create a more advanced tree of decisions in your shortcut: A parancsszerkesztőben húzzon úgy egy második Ha műveletet, hogy az átfedje az első Ha művelet alsó részét. A második Ha művelet be van ágyazva (be van húzva) az első Ha művelet alatt.