Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hello,
New to MC15 but getting along with the help of Google and this forum.
One question that I have yet to answer and would appreciate some basic help:
I want to be able to change a variable value via text box. However a text box formats entries as a string. I have researched it pretty extensively but with no joy.
Can anyone tell me how to easily get a text box to output a numeric value and not a string? I do not need to validate the info just have it spit out the numeric.
Much appreciated.
Thanks,
Chris
Solved! Go to Solution.
Inside the listbox script, use the VBscript CDbl() function.
Outputs(0).Value = CDbl(TextBox.Text)
Inside the listbox script, use the VBscript CDbl() function.
Outputs(0).Value = CDbl(TextBox.Text)
Richard,
Thank you.
That worked. I also found that I could use "WebControls."
Thanks again.
Chris
The other way is to use the built-in function "str2num" (this function returns a constant formed by converting string into a number):