AddDatarow

How to write the datarow value in the second col
Im trying this {“”,Itemcode} it leaves the first 3 col as empty
CATNumber ItemCode
ABC8349
ABC788
ABC117
6899209
7900287
783929


inside the for each I added one datarow the array row value {currentitemCATNumber}…
In the Second for each activity I added another datarow the array row value {currentitemCode}
here how to add the datarow to the correct column

Hi @AbarnaKalaiselvam

Try this:
{Nothing, ItemCode}

or

For Each row In dt.Rows
    row(1) = "ItemCode"

Hi @AbarnaKalaiselvam

Try this

For Each row In dt.Rows
row(“SecondColumnName”) = row(“ItemCode”).ToString

or

For Each row In dt.Rows
row(“SecondColumnName”) = Itemcode

I didn’t iterate the datatable

looks like you are looking with regex on a text and then want to insert the matches into a dt at a second column

Matches - output myMatches
For each | item in myMatches | TypeArgument: Match

  • Add DataRow| ArrayRow=new Object(){nothing, item.Value}, DataTable=YourDataTableVar
CATNumber ItemCode
ABC60894
ABC61708
OYU7817
147839
116781
111567

When expecting that ABC60894 and 147839 are within the same row, then you missed out a few important details from the case description.

Give a try at:
set on the for each eactivity the index with a variable: idx

Matches - output myMatches
For each | item in myMatches | TypeArgument: Match | index: idx

  • Assign Activity:
    YourDataTableVar.Rows(idx)("ItemCode") = item.Value

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