Adding date to the running table based on Workflow

Hi @umutcankurt , presumably your reference table will be stored as a file so that on each invocation it reads the file and appends a new “yesterday” date, if it isn’t already present?

I’m not sure if this is entirely what you had in mind but I’ve bundled a small workflow into a metanode, so that it acts like a simple table. When it executes it finds yesterday’s date and appends it to the end of a csv file stored in the workflow’s data area, and returns the current date table in full.

The additional try-catch around the CSV handles the case when the csv file doesn’t already exist, in which case it gets created.

image

Persistently store historic date table.knwf (29.1 KB)

btw, there are other ways to get yesterday’s date (such as using one of various nodes to retrieve current execution time), but I prefer hacking String Manipulation :wink:
string(java.time.LocalDate.now().minusDays(1))
and then using String to Date&Time

2 Likes