Validations are something that we have to handle, while we are dealing with particular data.
Similarly in automation too, we check for different validations before performing any task.
Let us see how to check if the provided data is a numeric or it is not numeric!!!
_booleanResult = isNumeric(_input)
Note:
1. _input is the argument to the IsNumeric Function
2._boolenResult returns the true or false value based on the input
Example
Implementation using UiPath :
Let us implement a workflow which takes input from the user and checks if it is a numeric or not a numeric.
Step 1:
Drag “Input Dialog” activity into the design panel and try to save the user provided value into a variable for further operations.
Step 2:
Drag “If” activity into the design panel and fill it with above-mentioned code.
Step 3:
Drag two “Message Box” activities into the If activity and represent the appropriate messages.
Note :
“If” activity returns true, then “Is a Numeric”
else “Is not a numeric”
Step 4:
Finally, let’s run the project
Click here to download the Source Code…
Hope it has helped you…