Hey @NGM
Firstly, there some info here in formatting code for posts which helps neaten things up for us to read on the forum ![]()
Secondly, I'm not sure on the exact syntax to use dmx.parse to set the value of a Wappler variable, that's when I use dmx.app.set all the time.
Based on your code above I'd try:
dmx.app.set('selection', a)
Now remember, this won't update the variable you've created in the UI. It will create a variable that you can use in you app in code though. So you can use it the front end by using {{selection}} anywhere you'd want to use it. Such as dmx-bind:text="{{selection}}"
To be honest, I'd forgotten about using .setValue. not sure if it works all the time and you can just fix the syntax, but dmx.app.set' or 'dmx.global.set will definitely work for you.