Trying to find out if a textbox is a number

Hi, First my account has some how disapere from this forum and that’s sad Nothing to do just to accept the fact…

I have new question. I’m working with a textbox and trying to find out if the value is a number.
I have tried to use ”Is numeric”

I want to distingish if the input is ”123A4” or ”ABCD” from a straight imput with just numbers like 1111. In my code its all No Numeric

I have also tried to use the error handling like divide the input with 1… You cant divide AAA/1 then You get a error … If I somehow can use that errorcode disconect and connect it with an action, like ”on error” in VBA

There is problebly som other way to deal with this and I’m grateful for all help I can get

blocks

Working OK here…

blocksIsNumber

Ok thanks ! But I have a “green” inputbox. I woundered if thats what causing the problem. I will dig in to it…

Yes, connect to Companion and make a right mouse click:

Hmm… that option is faded and You can not choose it.

Got it sorry and thanks, testing now!

Wont work all “no numeric”

Not clear why this is proving so difficult for you ?

blocksIsNumber2

1 Like

show the result of "Do it"

Well the status of do is exactly as You show me… Its the IF statement that cant seem to know what true and false!

blocks

Sorry for the file… Sometime I Cant download a image…Just open it in Your webbrownser

My idiot… If and else… I totaly missed that. Time to do something else…

I have now change to Chrome an now the copy function works. I have still problem with the IF statement. It will not choose between true or false. What is it that I miss…

Label2 is set to Nonnumeric

And the answer is all about the green “true” The green true is false but if You use the red “true” it works as it should

blocks (3)

you are doing some strange things here…
see screenshot and example project about how to do it
Unbenannt
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

numeric.aia (1.8 KB)

Hi ! perhaeps… but now I Have found a sollution explained above. There is somthing with the IF statement that dont like my green true. I do it the easy way I use the red true and now it works

Thanks for Your help

Yes, that's really strange:

Not strange really…

If you set a label with the “logic” true from a condition (or a green block), the label is written with text, and not the boolean.
(This seems logical :wink: )

You need to set a variable with the “logic” true to retain the boolean

blocksvarnumeric

1 Like

Yes of course, thanks for the enlightenment, I was in a mental dead end ... sorry! :confounded: :sob: