For each row error (Solved)

activities

#1

I’m trying to create a robot to automate some web form entry. I am trying to loop through an csv that has information to input into the web form. I am super new and am just trying to figure out why my loop isn’t working.

The only thing I can think of is that in this tutorial https://www.youtube.com/watch?v=EhEE_DVxaS4&t=21s
it shows a for each row in datatable and my loop just says for each row. I don’t know what the difference is, but I’m just looking for some help.

Let me know what I’m doing wrong.


#2

If Csv1 is a DataTable, then just Csv1 is enough, instead of Csv1.Rows.

By the way, if you mouse-over the blue exclamation mark, you can see the error message.


How to use for roop with using System.Data.Datarow input
#3

Hey @drudd75077

When you will use For each Row Form Datatable Category then by default the Argument type will be System.Data.DataRow so no need to use .Rows. you can directly pass the datatable to it.

if you are using For each activity from Control category then you have to pass the argument of type System.Data.DataRow and then you have to use .Rows to get the things :slight_smile:

Regards…!!
Aksh


How to use for roop with using System.Data.Datarow input
#4

Thanks for the responses, I was able to get my program to work. I am just getting started, but I did read the error. I just didn’t know what it meant.

image

This is what the error stated. Is there a how to or a post about common errors and what they mean? I’d be interested in learning more about how to address these things.


#5

Hi drudd,

I am getting the same error. Can you please let me know how did you get your program to work?

Thanks and regards,
Rajiv


#6

Hi @Rajiv_Mulchandani

Does his post help?:


#7

Exactly, just getting rid of .Rows solved my problem.