Is there a way to get the value of a JS variable into a Velocity variable?
In a page script, I have some JS code and I'd like to just parse an output to a Velocity variable but I can't seem to find a way.
The other way around seems to work though, I can use the $!pageContext.put
and .get to read a Velocity variable and use it's value into some JS code.
I was also trying to create a page parameter, and I could use the $pageParameter.VARIABLE.valUE()
to read the parameter value, which didn't help me.
What I'm trying to do is, inside a page script, have a variable that stores how many work items ranging from today-7d to today. I thought this should work with something like
#set($newSrFilter = $transaction.workItems.search.query("type:changerequest AND created:[$today-7d$ TO $today$]"))
but the $today variable doesn't work in page scripts for some reason.