A switch case would do the job, then set a case for each number from one to ten. In the case, set a variable to the digit from 0 to 10.
strNumber is a String
intNumber is an Integer
A switch case would do the job, then set a case for each number from one to ten. In the case, set a variable to the digit from 0 to 10.
strNumber is a String
intNumber is an Integer
if you want to check the variable case-insensitive feel free to use variable.ToLower() as your switch case expression
Good call. May also want to add a .Trim in there too if there is any potential for there to be white space.
after run not display any digit
The digit is in the variable “intNumber”
If you want to display it on the screen, use a Message Box activity, with the value as intNumber.ToString
what is datatype of intNumber
strNumber is a String
intNumber is an Integer
Good morning Arun,
Does one of the workflows in the following thread fulfill your need?
Hi, @chenderson it is the exact opposite of my task… I am trying word to the number Hope someone could help me
Add a IF statement
add in the Expression textbox: string_variable.ToLower.Trim = “one”
add to the Then area a assign statement
in this assign statement add numberVariable = 1
after the IF statement add a MessageBox with numberVariable.ToString in the message field.
if the variable string_value is “one” the numberValue will be 1.
copy this if block 9 times and change the values from 2 to 10.
Good luck
My apologies Arun,
Maybe this solution:
Yeah one solution is better than nothing
Okay, a better solution is the switch case statement mentioned above from @andrewjames
If you could provide us a screenshot of your non-functional switch case function we could help you.
Thank yo so much you all are supporting me