Global variable setValue - how to?

I have a global variable called “name”.
image

When defining a button click action,

How can I setValue the global variable directly? Basically, I was expecting the global variable to be listed on the left side of the available list of actions (for eg like a normal variable/array component)?

Am I missing some theory (or) is this still not available as a capability?

In fact, I can see the global variable listed in the “data binding” dialog, and able to use it (for eg, assign it to a normal variable).

1 Like

same question …

Hey @Fabriceh $ @Akayy,

I suggest you to check this doc, because it’s showing how variables works and how you can set the value of a variable : https://docs.wappler.io/t/passing-values-between-your-pages/5588
I think this doc is also a good ressource for you if you want to use “SetValue” from your server action : https://docs.wappler.io/t/using-set-value-in-server-connect/11647

Hope this helps :slight_smile:

1 Like

Thanks, variable in wappler is not clear… The question above is about global variable in the app object, not server connect. … Maybe a complete real documentation about each button and possibility of the software is to start …

Really, reading a lot of comment here… it seems that a lot of people stop using wappler because the poor documentation… We can feel its powerful, but still not clear enough … spend lot of time to guess how its working, and searching the forum is … painfull

@Fabriceh
In my first link you can see how to set a value for a variable (global variable or not): https://community.wappler.io/uploads/default/optimized/2X/a/ad2874f17c2522f68473774db3e9cfc995910982_2_690x396.jpeg

While there are some informations missing, I personally love Wappler’s documentation, it’s very rich and that’s part of the reason why I like Wappler.

I haven’t seen anybody leaving Wappler for this reason (yet), but I do see a lot of people coming to Wappler because there is a good support for them or the community, the documentation is not that bad at all, and the software itself is awesome. :slight_smile:

This may help.

i’ll have a look

Old thread but I wanted to follow up as I was also recently confused by this. I found that you can directly set the value of a global variable like so:

dmx.app.set('name', 'value')

And you can place that in the static events of a button or whatever else. Not sure why I can’t see this as an option on the available list of actions as pointed out by the original post. I have to agree with @Fabriceh that the documentation was lacking in this topic - if it weren’t for help from some colleagues I would never have found this out and any documentation or forum post regarding this were more related to working with Javascript functions.