I have a shortcut which creates appointment in my calendar, I begin with selecting the date and time then select from “Doctors”, Dentist” etc. I have two calendars, one for personal and one for Work. I’d like to add the appointment to my Work calendar if it occurs on a weekday…otherwise it should add it to my Work calendar.
The problem: does anyone know how to have an Statement include multiple values like an OR statement? Don’t really want to repeat all the actions for each day of the week.
Hope I’m making sense, if anyone could point me in the right direction, I’d really appreciate it (as it’s driving me mental!)
If you format the date with with a custom format
EEEEE (5 E’s), it will return the first letter of the day. So, you can now compare
If Equals "S" to match a weekend, otherwise, it’s a weekday.
There aren’t OR options, but you should be able to produce the same result using a setting of a flag variable.
set X to false
if A is true then set X to true
if B is true then set X to true
if C is true then set X to false
if A or B is then equivalent to if X.
Another option is to have a dictionary of the days of the week to the calendar you’d like to use
Monday : Work
Tuesday : Work
Saturday : Home
And then choosing which calendar is just looking up the date’s day of the week in the dictionary.
Thank you…works a treat! So simple too!..should’ve been able to figure that out!
Thanks for all the suggestions folks, went with the supermamon’s suggestion and looking into the dictionary way of doing it.
Thanks again everyone, much appreciated.