Finding the UUID of any variable to use in Javascript

Hi, I’m trying to write some JavaScript code and need to read the value of a variable. I believe we need to refer to its UUID in JavaScript, but please correct me if there’s a better way.

Just wondering—what is the process for discovering the UUID of a variable in WeWeb?
Or is it possible to reconstruct this Javascript in nocode formula?

The code snippet for context is:

const clientSecret = variables[‘SOME UUID HERE THAT IS THE VARIABLE’];

var elements = stripe.elements({
clientSecret: clientSecret,
});

return elements;

The fastest way to know it would be to place the variable in the formula editor and then changing it from formula to JavaScript. It will automatically display the UUID of the variable.


Thanks very much, that seems to work fine. I just need to trust working with variable UUID’s where necessary in JavaScript.

1 Like

You can simply use this option when clicking on the three dots. No need to go to crazy lengths as described above each time you need a variable’s ID.

1 Like

Hi @Broberto!

I don’t know if you’re on a beta program, have an enterprise level account or some kind of browser plugin. But mere mortals don’t have that option.

More → Development → Show dev information should do the trick.


2 Likes