I am struck here.Can anyone help me out regarding this error below?
Not sure what is the issue.
When i am giving the DataTable name(“names”) in the For Each activity it works fine but when i given the (DataRow) “clubMembers” in the For Each activity it is showing the below
For each row takes
Only DATATABLE as input
So I hope you have a datatable variable already like names, pass that as input
Or
If we want to pass only datarow as input
Then use FOR EACH activity
Where pass the input as clubmembers or names.Rows (any thing based on the process ) and change the type argument property in the property panel as System.Data.Datarow@achyuth_tulsi
Hope this would help you
Kindly try this and let know for any queries or clarification
Cheers @achyuth_tulsi
@achyuth_tulsi for each row usually uses when we’re working on datatables only,since this clubmembers is of array of datarow it won’t be applicable to for each row.
Yep, usually you will get an Array of DataRows when you perform some type of Filter calculation to pull in specific rows. This is a good thing, because then you can only loop over certain rows of a particular data set.
Simply use the regular ForEach activity rather than the For each row. Then, set the ArgumentType to DataRow, since the array contains a set of DataRows.
I don’t recommend converting the set to a DataTable (which can be done by using .CopyToDataTable next to your Array), because then you need to check the .Count of the Array prior to conversion or you will get errors. Additionally, you lose the original data set, when you do that, so you can’t update the entire table throughout the process.