I can type dxm.parse(name) into the browser dev console and get the expected value, but I can’t seem to get the expected value exposed in the javascript. (expecting 1 for class_0, and 0 for class_1)
The flow steps run synchronously, but do not wait for the server connect call to complete.
So after your first step, second step run immediately, irrespective of weather you have received a response from the first call.
What you need to do is put the JS calling Flow in the dynamic success event of the server connect. Then it should work reliably for you.
As for setting the 'BADGE' value, it should be pretty straight-forward with dmx-html or dmx-bind:value. No need for flows or JS.
If you can share your HTML, I might be able to help better.
I moved the JS to the success, and it works the same (fills the variable instead of the value) in the browser, but it actually populates the value in the wappler app. But I am interested in what you’re thoughts are on using the dmx-bind:value.