Numbers in TextInput/Label

I want to set a number as a result into a field.
It works perfectly to set a number in a Label.
But trying to set a number into a TextInput field fails.

Is tha a bug or intended?

PS: It could be useful to get a pair of functions in Math and Text to change the type of a variable from text to number and vice versa.

Hi there. We just released the ability to set your Text Input keyboard to Numbers Only – hopefully this helps you with your Math functions.


1 Like

It helps only a little.
Yes: The input for numbers is much easier now.
No: The type of the value of a text_input field is still of type string, wich makes math operations with these values impossible and a set-operation with a number is not possible.

I think that the content of text_input elements should be generic and should to be typecast to the appropriate type by the system depending on the operation made with them.

Any update on this. Still unable to use text field for arithmetic operation even after enabling Numbers only in the text field.

Hi there
I created a workaround in the meantime using a function,

It would really be great if they can fix this issue, but in the meantime we can use this.


1 Like

Currently works for integers only

I got the function to work with decimal numbers as well. The code is long and does not fit a screenshot. Maybe someone can tell me how to export the code, that I can paste onto the board.
Anyway here is a shared version

I added zero (0) with the input value, then assigned to a variable.
Works for me!Capture