Clearing Spreadsheet if in a New Month

In my process, I have a spreadsheet that is used for the duration of the calendar month. When my process runs for the first time in a new calendar month, I want a few of the columns to be cleared. This will be in the Init state/If first run part of the framework.

My current solution is to place my activities to update the spreadsheet in an If block with the condition being:
(new datetime(now.Year, now.month, 1).AddDays(-1).Month) <> now.Month

This works for now, as my process will run daily. However, I want to change it for instances where it may no longer be on a daily schedule, or for if the job on the first day of the month doesn’t run for whatever reason.

Thanks!
Meagan

1 Like

I too would like to know an answer to this. I am working on something and I would need this feature very soon.

I’m not sure, if I understand you right.
But I think, the easiest way is, to store or recieve the last date from your spreadsheet.

1 Like

You could store the month updated in an orchestrator asset. Compare the asset and the current month in the init state. When there is a mismatch between the asset and current month, update the asset to current month and clear the columns that you wish.

1 Like

I like that idea, and see a Set Asset activity, which I didn’t know existed. Thanks, I’ll give that a try and report back!

Sure. happy to help.