getVar() example?

I've spent a bit too long trying to understand and perhaps need more coffee :coffee:. I'm not understanding the use case and how exactly getVar() is to be used. May someone provide me with an example?

I understand setVar() and using it correctly, but I just don't understand what getVar() is supposed to be grabbing. The documentation says it's grabbing the custom variable of a widget. Is that a local.variable that is created in one of the scripting properties? Or, is it grabbing a variable widget? Either way, I can't seem to get it to work.

Cheers,
DMDComposer

Hi DMDComposer, if I got it correctly, you can store a custom variable (from scripting fields) into any widget and then grab it from scripting and/or advanced syntax with VAR{}

I've attached an example, hopefully this helps.

Cheers

getVarThing.json (2.1 KB)

2 Likes

Thank you! I understand and see how it's working now. I appreciate the example, it's exactly what I needed.

Cheers!

1 Like