Change variable value inside formula?

I’d like to change a variable value inside a formula.

I’ve tried this but it doesn’t set the value, rather returns “false”:
myVariable = “value”

How do I do this? Or do I have to use a dedicated workflow?

Inside a formula the = sign is comparing it to something so it will return true or false.

You will need to do it in a workflow.
If you do it in custom JS this will work
wewebVariable = ‘value’

Or

Add a ‘Change Variable Value’ action and change the variable there