My next app feature will require me to do various bits of maths in a page flow and pass the values back out to some dmx variables. I’m having problems passing the values back out and encountering the “Formatter Doesn’t Exist for Type Number” error message.
@teodor, could you show me how to do this without getting the error please? (I’m using Wappler 6.0.3)
Let’s take a simple example of X+Y=Z…
<!doctype html>
<html>
<head>
<script src="dmxAppConnect/dmxAppConnect.js"></script>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="bootstrap/5/css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
<script src="dmxAppConnect/dmxBootbox5/bootstrap-modbox.min.js" defer></script>
<script src="dmxAppConnect/dmxBootbox5/dmxBootbox5.js" defer></script>
</head>
<body is="dmx-app" id="app_maths" dmx-on:ready="flow_maths.run()">
<dmx-value id="x" dmx-bind:value="1"></dmx-value>
<dmx-value id="y" dmx-bind:value="2"></dmx-value>
<dmx-value id="z"></dmx-value>
<script is="dmx-flow" id="flow_maths" type="text/dmx-flow">[
{
assign: {value: "{{(x.value + y.value)}}", name: "z", outputType: "text"}
},
{
run: {action: "{{z.setValue(z)}}", outputType: "text"}
}
]</script>
<div class="container">
<div class="row">
<div class="col">
<p class="fw-bold text-center text-danger">X+Y={{z.value}}</p>
</div>
</div>
</div>
<script src="bootstrap/5/js/bootstrap.bundle.min.js"></script>
</body>
</html>