How jump to next row of one column to check column name inside the for each row

Hi guys, iam facing a problem while read excel data and entering into the application form.i have 5column like MRN,cpt,dx, etc values.where MRN values to be enter in first page and remaining are in 2nd page. So, i am using read range and for each row to iterate the program all is well with this but after completing one row is the next row mrn column is empty.i have to enter the remaining values into the same application form in the send page .and click ok I using string.nullorempty(row(“mrn”).tostring). To escape from first page. But I not getting to compare the next row mrn column before clicking ok button I also used dt.rows.indexof(row)+1 to jump into next but it’s read same row
I also use dt.rows.indexof(rownumber)(“column name”). tostring.isnullorempty(dt.rows.indexof(rownumber+1)(“column name”). tostring) here am getting an error integer cannot convert to
Please help me.

@thallapalli_sowjanya If you’re having Problem when comparing row(“mrn”) to a Null value, You can try using two conditions :
String.IsNullorEmpty(row(“mrn”).tostring) or String.IsNullOrWhitespace(row(“mrn”).ToString)

Thanks for replying “string.IsNullorEmpty(row(“mrn”).tostring)” these conditions is working properly I don’t have any problem with that.
At the of the bot am check that the next row mrn column is empty or not.if emtpy I should repeat the above steps.if it’s not empty I should click on ok button

@thallapalli_sowjanya I think you’ll need to Assign the Values of the current row to Variables, then , When you check if next row is Empty, You can assign the Variables value which will have value of the Previous row in it, if not empty You can click on ok Button.

If this isn’t what you needed, Please Explain your Process in Detail, Steps would be Appreciated :sweat_smile:

yes, thanks i got it

1 Like

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