Using variables with CSV Plugin

I'm not sure if this is possible, however I would like to use a variable to store the filepath name of the CSV file being rendered by the CSV plugin.

For example, I have a task set to run in which a report is generated in CSV format. The report that is generated appends the current system date in the format DD_MM_YYYY_HH_MM_A(P) to the end of the filename. I would need to be able to use the Run plugin (or something similar) to set and update a Confluence variable to match the newest filename and present the most recent report.

If this is possible, please let me know. Thanks in advance.

1 answer

1 accepted

Yes, you should be able to use the run or run-now macro to retrieve the $current_time and the dateFormat parameter to get a format matching your naming convention. An alternative is to write a small script (groovy) to get the most recent file in the directory. Use cache macro to improve performance.

Alright, and how would such a variable be passed to the CSV plugin? Would I precede it with a '#' the same as I would with a standard filename or is there some other syntax?

Something like:


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

473 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you