Example - Use a variable value in a conditional IF

Posted on
Fri Mar 03, 2023 11:15 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Example - Use a variable value in a conditional IF

I've just posted an example shortcut in the Library that illustrates how to get a variable, then use the variable value in an IF statement in a Shortcut. This turns out not to be as obvious as one might think. The key is that you have to explicitly tell the IF condition what the type of the value being compared against is. And (in a bout of exceedingly poor design), you can't do that in the IF condition itself, but rather in the statement before the IF you have to convert it. This shortcut shows you how to do that.

Note, there are probably other ways of doing it as well - I'm no shortcut expert, but here is one way of doing it.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests