How to get first value from the row - with inconsistent column

I am reading data through screen scraping: This is the sample data:

I need to assign the number 901 to a variable.
Sometimes it gets populated in first column/other times in second column.

I don’t want the other number.
And the second number can be a whole number or decimal. I only need the first occurrence of a number.
Any help would be appreciated.

Hi @chauhan.rachita30,

Use output datatable activity to convert datatable to string and use refer to get first occurrence of the full number.
Use Below regex pattern


Check string.isnullorempty condition if null get the second column value using below code


1 Like


Hope the following sample helps you. (8.9 KB)


1 Like

Hi, Thanks for helping. I have found another solution. I have taken an empty string. and assigning the first value to that empty string if its numeric. I cannot use break because I need to read through other values in the table.

Next time when it will read the numeric value in the other column, it wont go inside this if.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.