Pattern: On First Calendar Day of Month, Filter Table for All Entries from Last Month

If you have a table containing rows with dates in a YYYY-MM-DD format, you can use this pattern to filter that table for all of last month's entries. This will require that you create a scheduled trigger, and run this once each day. The first actions get today's date, and then format it in a D format, i.e. 2020-07-28 would come back simply as 28.

The next action conditionally starts if today is the 1st calendar day of the month. If the workflow started on 2020-08-01, it allows you to construct advanced filter criteria for the Tables: Apply filters action. We can construct the below filter in an automated way:

columns['Your Date Here'] >= 2020-07-01 && columns['Your Date Here'] <= 2020-07-31

The datestamps 2020-07-01 and 2020-07-31 will always be dynamic. You'll need to update the data table ID in the Filter table for entries between first and last date of last month step.

Sign In or Register to comment.