I am entering a quantity field into the application from a source excel file.
I want to put a validation like the quantity should always be a number(decimal not allowed).
Since the file is manually prepared, chances of some human error like and alphabet crept in the qty column, etc. To avoid Uipath to abruptly stop, i would like to put a validation that the qty column should always be an integer, If not it will proceed to the next in the loop.
How do i achieve this validation in Uipath?
if you are using for loop to iterate through the excel values, you can put an if condition inside the loop.
if (excelcellvalue) you can verify using method – if(excelcellvalue.GetType.FullName) = System.Int32
then perform the validation
else part you can skip the validation steps…
small syntax mistake, just use this syntax.
Normally if you read the data from excel , it comes as string even if it is numeric. The way you proceed is right.
A small change. To take the value from datarow , we use “Item()” . In the Item property you can specify the column name or Column index (Index starts from zero).
Below I have attached a screen shot. it can help you.
Thanks a lot. This worked
Thanks for your response. I used Isnumeric condition and it worked.
Again thanks for your prompt response,
If you think that you got solution , please close the thread as “Solution”.