Unanswered question

How to compute a variable value

I need to compute the current month minus 1. For example if the current month is December (12) then I need to pass the value "11" via the variable. (The server uses month with Index 0.)

I can see how to use CurrentDate and also Date, but I can't see how to write an expression to manipulate the CurrentDate (ie MM-1).

Is it possible?

Gordon G.
Gordon G.

Gordon G.

Level
0
49 / 100
points

Answers

Neil W.
Neil W.

Neil W.

Level
4
5000 / 5000
points
Team

Yes, you can do this in JavaScript, I can provide an example tomorrow

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

You can use the CurrentDate variable like in the screen shot attached

Gordon G.
Gordon G.

Gordon G.

Level
0
49 / 100
points

Thanks Nouredine. I did try this yesterday but every iteration it applied the -1 again. So the first iteration but 11 then it was 10 then it was 9. I need it to stay at 11.

Maybe I am missing another setting that I don't know about?

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

I do not reproduce that behavior. Could you provide some screen shots of your variable and where/how you use it?

Gordon G.
Gordon G.

Gordon G.

Level
0
49 / 100
points

Hi. My mistake. Your dropdown said "Month" whereas mine was more frequent. Thanks for your clear response! It now works.