Funnily, there is another “JS to bubble” element in the same page, which is working. I tried to check every character by character as to what is different, I am unable to see the issue.
Basically, when you press the button, it assigns a value to one of the “JS to Bubble” element. Then I try to retrieve value in the workflow and it shows that as empty when I put in a condition “Is empty”. But when I use it as a dynamic expression “Element’s value”, then the value gets assigned to the elements correctly.
Also, I am not able to read the value in Javascript too. When I print the value in JS console, I get empty value like this:
No Edward, that’s not the case. This is how “Run Javascript” works. I had tried putting it without quotes earlier and had got syntax errors.
I am very confident of this as I am using JS to Bubble at another place where it works, and I am using the console log bit exactly same way.
Also, the issue is not just in printing of the value. As you can see in my second example, Bubble is finding the value of JS To Bubble element to be empty. I have even given an example URL where you can try what I have built.
Thanks Daniel for sharing the answer. Great to hear.
Actually I had thought that I had found a workaround, but later realised that it didn’t work. Then I just gave up on using JStoBubble altogether and also on my use-case.