setVariable
inside scriptBlock is not actually setting the value for the variable {{COOL_NAME}}
, as we can see from the console.log on this two line code.COOL_NAME
was initialized using a setVariableBlock with the value not cool
and then the scriptBlock was exectued with the two line code, where the setVariable Function inside the script should change COOL_NAME
value to some value
but when I print it out using the console.log function the variable still holds it's initial value. The scriptBlock Execute on Client? is set to false as required so I'm guessing I'm missing something else. Is there any compiling flag or env variable I should set to have it working?My Variable
(freshly created, I deleted all previous variables to be sure nothing is being re-used ) followed by a second scriptBlock (server side executed) that only calls the setVariable function with a new value plus some logging. My Variable
value is never updated. docker-compose -f docker-compose.dev.yml -f docker-compose.yml up
from a pristine clone of typebot repository with no modifications at all.executeScript
exported function at /home/epc/Projects/typebot.io/packages/deprecated/bot-engine/src/features/blocks/logic/script/executeScript.ts
console.log
function inside the scriptBlock to trace the variable's current value during the script execution but it seems that setVariable
updates the value only after the execution ends, therefore the printed logs output still shows the initial values given me the impression that it was not working. Once I wrote a flow similar to yours and displayed the variable in a text buble I could confirm that the value is actually being updated.