Adding multiple reminders based on an input base date

Hello all, I have been trying off and on for weeks to sort this and failed!

I have a medical condition which means I need to take various medications at different times. All of these meds are triggered from a single date when I visit hospital for treatment.

So the pseudo code is simple -

Ask for BaseDate (could be future or past)

Add Reminder to Meds on date BaseDate + 1 day at 8:00am

Add Reminder to Meds on date BaseDate + 1 day at 1:00pm

Add Reminder to Meds on date BaseDate + 2 day at 4:00pm

Etc (I have about 15 reminders to set, some several days beyond BaseDate)

Thank you for your help

Here you go. Just add entries to the list for your remaining medication times.

Thank you, I get the idea but when I run it ‘as is’ it creates a reminder for 01/01/4001 00:00

Sorry. I moved the list to the top to make it easier for you to maintain, and it looks like Shortcuts switched the loop to iterate on a date rather than retaining the list I’d set it to.

This has the right variable set and gives me an output lsuch as the one below.

Thank you for your help, I needed to modify you version to fit my precise needs, and have been trying since you posted your answer - to no avail!! My problem seems to revolve around 3 different lists for 3 different meds. I understand the BaseDate calculation, and the repeat for each item in the list, but I am confused about assigning variable names particularly for the different lists?

So I am reaching out for help again, so sorry to bug you.

It’s probably easiest to show the output, basically I have 3 different meds, at different times and days, with some overlap.

Med1 26/01/2024 at 8:00am
Med1 26/01/2024 at 12:00am
Med1 26/01/2024 at 4:00pm
Med1 27/01/2024 at 8:00am
Med1 27/01/2024 at 12:00am
Med2 27/01/2024 at 3:00pm
Med1 27/01/2024 at 4:00pm
Med2 28/01/2024 at 3:00pm
Med3 29/01/2024 at 9:00am
Med2 29/01/2024 at 3:00pm
Med3 30/01/2024 at 9:00am
Med2 30 /01/2024 at 3:00pm
Med3 31/01/2024 at 9:00am

Once again, thank you for your help

While for multiple medications, there are more sophisticated approaches that can be adopted such as using dictionaries to store the medication information and using recursive shortcut calls to process the information, the simplest way to adapt the example I provided is just to replicate the data and the processing loop, but just establish the base date once.

1 Like

That’s absolutely perfect! Thanks!

My only problem was assigning variable names to the separate lists, I think I’ve got it now!