Wappler does modifiy calculation expression

======== TEMPLATE BUG FORM ========

Wappler Version : 5.8.1
Operating System : Mac OS Ventura 13.14.1 c
Server Model: NodeJS
Database Type: Postgre
Hosting Type: Docker / Localhost

Expected behavior

What do you think should happen?

Trying to set a value.
{{queryGetTRInfos.quantite_periode.toNumber()*$number}}

This works perfectly

Actual behavior

What actually happens?

While editing my script Wappler automaticaly modify it into:
{{queryGetTRInfos.quantite_periode.toNumber()}}{{*}}{{$number}}

This doesn’t work

{
“status”: “500”,
“message”: “Invalid time value”,
“stack”: “RangeError: Invalid time value\n at Date.toISOString ()\n at dateAdd (/opt/node_app/lib/formatters/date.js:26:21)\n at /opt/node_app/lib/core/parser.js:670:26\n at parser (/opt/node_app/lib/core/parser.js:359:19)\n at Object.parseValue (/opt/node_app/lib/core/parser.js:732:24)\n at App.parse (/opt/node_app/lib/core/app.js:630:23)\n at App.setvalue (/opt/node_app/lib/modules/core.js:144:26)\n at App._exec (/opt/node_app/lib/core/app.js:609:57)\n at App._exec (/opt/node_app/lib/core/app.js:576:28)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)”
}

(I spend half a day more to understand why my SC didn’t work anymore)
(I had the same kind of trouble with Insert step but don’t remember exactly and can’t report it… sorry)

Thanks

Have you tried putting the expression in brackets? That often fixes these kind of things!

Thanks Antony;
I did and it works, my SC is already working.
Maybe it’ld interesting to fix this kind of behaviors.

If you are using valid variable names that do not contain spaces, special charters or starts with number, you should need to enclose them in brackets. And if you do - just use Wappler’s data picker for all the e press ions and it will correctly enclose them for you if needed.

1 Like