Creating school registers from data using arrays and Google Docs

:bullseye: What is your goal?

I want to change my automation to run on one day a week but create registers for the following 5 days (one register per file)

Filter is:

:thinking: What is the problem & what have you tried?

I do not know how to change a filter as the automation runs (i.e. it runs for one date and creates the document then needs to rerun with date as now+1 and create a document and then now+2 and create a document etc)

I also see a problem where I have filter as Month NOW but if it is a week where the month changes i.e. 30 Nov to 1 Dec, how can I make this work?

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

B4. 2Register.blueprint.json (46.3 KB)

I have managed to solve PART of this.

By adding a repeater at the beginning and setting the start to 0 and then adding the add days and the (i) from the repeater it will move through creating individual files for each day.

Still requiring help:

Still not worked out how to have it move to the next month yet. e.g. if it runs on a Sunday and the dates are 30 Nov, 1 Dec, 2 Dec, 3 Dec - it will only look for 30 Nov because the filter will not know to move from current month (November) to December for the week ahead:

Currently, your month condition is linked to the current month using formatDate(now, “MMMM”)), so it remains unchanged.

Instead, calculate the month from the shifted date itself addDays(now; i)), just like you already do for the day, and use that same shifted date for both the Month and Date parts of the filter.

That way, when the week rolls into the next month, the filter follows it instead of staying stuck on the original month.

Let me know how it goes!

1 Like

Amazing- a simple way but if you don’t know, you don’t know.

1 Like

You’re welcome! It’s like doing small things in a great way.