Hi all,
I'm running a workflow that get's historical data, copies it and appends today's date to Run Date column as shown below, but am unable to make this workflow work. My data has the following format, any one know I can make this work?
Item | Value | Run Date |
A | 10 | 10/05/2021 |
A | 10 | 11/05/2021 |
A | 10 | 12/05/2021 |
Hi @mtuwanax ,
You need a formula tool to either create a new column, or replace Run Date with datetimetoday()
M.
hey @mtuwanax
Just to check, you just need todays date appending as a field to rundate?
I've done that in the attached workflow, but only where rundate is null, so that it doesn't replace the current values.
IIF(IsNull([Run Date]), DateTimeFormat(DateTimeNow(),"%d/%m/%Y"), [Run Date])
The key is to use datetimenow() to get the current date, and then format this as dd/mm/yy
Hope this helps!
TheOC
Hi @TheOC @mceleavey
Thank you for your responses.
I realized that my question was not very clear. In my workflow, I ran a daily report to get the current month's data and append today's date as the run time to the excel workbook, which i've been able to achieve. My challenge is copy previous months' data and appending it to the workbook and adding the today's date as the run time to the historical data.
Hope the question is clearer now. I've built this workflow, but somehow it appends an excessive number of the historical data.
Hi @mtuwanax
Something you can do is read the historic data and append it with the new data using union tool. Later you can use to the formula to assign run date.
Example:
Hope this helps 🙂 If not let me know how i can help you.
Hi @atcodedog05
Thank you for your response.
I'm afraid that your proposed solution wouldn't work for me, as I need to the historical data to contain the past run dates and today's run date. Ideally, I want to copy the old data, and create new rows using the old data and append today's date as the run date. e.g. if the historical data had 30 records on 13th May, then on 14th May, I want to copy the 30 records, append today's run date and have 60 records after saving the workbook.
Hi @mtuwanax
Just to clarify myself which of the below is correct.
on 13th may: you will have 13th may data (30 records)'
on 14th may: you want 13th may data (with old run date, 30 records) + 13th may data (with new run date, 30 records) + 14 may data (30 records)
=total 90 records
or
on 14th may: you want 13th may data (with old run date, 30 records) + 14 may data (30 records)
=total 60 records
Hi @atcodedog05
this is the correct understanding:
on 14th may: you want 13th may data (with old run date, 30 records) + 13th may data (with new run date, 30 records) + 14 may data (30 records)
=total 90 records