Replies: 2 comments
-
I'm not exactly sure I understand the specific need for pulling datetime off of the task itself, but can't you just use YAQL datetime functions? https://yaql.readthedocs.io/en/latest/standard_library.html#datetime-functions |
Beta Was this translation helpful? Give feedback.
-
Ok after seeing your other post and taking a closer look at this one I see your issue. You have the default set, but the task() context isn't generated until one of the tasks are actually executed. So in other words you're calling Anyways, you'd need some kind of logic in order to use it during task runtime. input:
- report_date # default is None if nothing was passed in from calling action
tasks:
task1:
action: core.echo message="Welcome {% ctx().report_date or task().start_timestamp %}" This is untested but give it a shot. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to set action default parameter to be current timestamp?
I tried:
But that outputs just "Welcome None"
Beta Was this translation helpful? Give feedback.
All reactions