Hi, I currently have a setup, where I use Text Inputs to pass/set Parameters in REST Queries. These Parameters have to be of type String. Now here comes the problem. Whenever I have an input consisting of numbers only, it will be converted to some numeric type, leading to a bad request error.
Example:
“idInput” is an Input Widget set to be of data type “Text”, which is passed to a REST request. The REST body is set up to take the input of widget via Mustache expression, something like:
“id”: {{idInput.text}},
When the value of ID is something like “12EF567” its evaluated to string and the request is fine, but if the ID is “1234567”, i get an error, telling me “[id must be of type String]”.
the request body evaluates to:
“id”: “1234567”,
Now I have already tried several things like:
“id”: {{idInput.text.toString()}} → evaluates to “id”: “1234567” → still wrong type error.
“id”: "{{idInput.text}} → evaluates to “id”: “1234567” → still wrong type error.
“id”: "{{idInput.value}} → evaluates to “id”: “1234567” → still wrong type error.
“id”: "{{idInput.value.toString()}} → evaluates to “id”: “1234567” → still wrong type error.
The only thing that currently works is directly putting the string into the request:
“id”: “1234567” → evaluates to “id”: “1234567” → success!
I think there is some kind of Bug or automatically casting values Numbers, but I’m not sure if I just use the Mustache expressions wrong.
Thanks in advance for your help
KR
David