I’m trying to add functionality for recurring items to GSD5. I’m almost there, but I’m having trouble with running the final macro to generate all of the recurrence dates. Basically I am taking the gsd_complete_date variable and incrementing it with some help from @EricShulman’s ParseDate function.
Right now, this macro in particular should just print out the gsd_complete_date + the number of days returned by the getDueDate macro.
\define createRecurItems()
<$list filter="[field:gsd_type[action]field:gsd_complete[true]has:field[gsd_frequency]]">
<<getDueDate {{!!gsd_frequency}}>>
</$list>
\end
<<createRecurItems>>
The getDueDate macro works, but here it is for context:
\define getDueDate(frequency)
<$let today=<<now "YYYY0MM0DD">> format="[UTC]YYYY0MM0DD"
oneday={{{ [[24]multiply[60]multiply[60]multiply[1000]] }}}
oneweek={{{ [[7]multiply[24]multiply[60]multiply[60]multiply[1000]] }}}
onemonth={{{ [[30]multiply[24]multiply[60]multiply[60]multiply[1000]] }}}
yesterday={{{ [<today>parsedate[unixtime]subtract<oneday>parsedate:unixtime<format>] }}}
daily={{{ [{!!gsd_comp_date}parsedate[unixtime]add<oneday>parsedate:unixtime<format>] }}}
weekly={{{ [{!!gsd_comp_date}parsedate[unixtime]add<oneweek>parsedate:unixtime<format>] }}}
monthly={{{ [{!!gsd_comp_date}parsedate[unixtime]add<onemonth>parsedate:unixtime<format>] }}}>
<<$frequency$>>
</$let>
\end
This is the part that is not working as I expected:
<<getDueDate {{!!gsd_frequency}}>>
I’ve tested each piece separately - getDueDate works and the gsd_frequency variable is returning the right value, but when I put them together it just shows up blank. Is there something wrong with my syntax?
Thank you!
Bobby