ScottR
August 15, 2022, 6:24pm
1
Using
.trigger({ additionalScope: {monthNumber:i} })
in a js query
the resource is using
{{moment().subtract(monthNumber, 'months').startOf('month').format('YYYY-MM-DD')}}....
monthNumber is not being passed in/read....
Anyone have a similar issue?
ScottR
August 15, 2022, 6:50pm
2
I solved it by using a temp state...but am curious as to what is not correct in the above implementation.
Hi @ScottR !
We're experiencing some oddities with momentJS and Retool JS values. How are you currently using temp state?
ScottR
August 20, 2022, 1:01pm
4
I simply set the temp state in a loop in the js to increment the month number and then read that value back in after setting it...
Hi @ScottR
Does your implementation look like what I have here? I wasn't sure where monthNumber was coming from, so I just placed a digit and it seemed to work.
\
ScottR
September 2, 2022, 9:53pm
6
I wasn’t passing i. I used monthNumber as the variable. So I will try that and see what happens. Thank you