Can't state.setValue() be used in transformer?

I am trying to set the state in a transformer.
But it just doesn’t work.

Is it expected?

1 Like

Hi @hawaii! Transformers are read-only, so any JS methods/functions that attempt to change values in the app model wouldn’t work from inside them. The .setValue() method would only be usable inside of a Run JS Code type query.

Thinking about it inverted though, if you set the default value of a temporary state to {{transformer1.value}} it would update to the transformer’s return whenever that value changed.

1 Like