Returning a variable from Expression Element

Hi all,

Looking for some help with a really simple thing that I can’t seem to figure out (maybe I’ve missed something).

I’ve got a JS snippet inside an HTML element that creates a video. I then create a variable called ‘URL’ which is the returned URL of the video stored in the external service we’re using.

I added a console.log statement to print the variable when it gets written so I can make sure it’s coming back - this works perfectly.

However, trying to access that URL variable in the Expression element as part of the Toolkit so I can actually save that URL to the bubble database just returns nothing. I know the URL variable is working because the console shows it.

What am I missing here:
This is the code that creates the variable and displays it in the console:

This is the expression element trying to return the URL variable set as a piece of text:

This is the console clearly showing the returned video url:

Thanks in advance

Reece

You might try the js2bubble from misha’s Toolbox plugin:
First, write a js function that grabs the variable, then call it. The plugin should listen.

image

And you can store it on call:

image