setValue() How do I change to synchronization?

Simple example:
text1.setValue(“TestA”);
text2.setValue(text1.value);
text1.setValue(“TestB”);

↓I looked at past questions but couldn't get it to work.

I believe if you toggle this feature in the Advanced tab of JS queries, this should work as intended:

1 Like

You need to add await statements AND toggle the option "Keep variable references safe" in JayL's answer. Like so:

await text1.setValue(“TestA”);
await text2.setValue(text1.value);
await text1.setValue(“TestB”);