I want to use for each row in a column i want to use increment
Eg:
ID1:
ID2:
ID3: …
How do i achieve this ?
I want to use for each row in a column i want to use increment
Eg:
ID1:
ID2:
ID3: …
How do i achieve this ?
HI @RACHEL_PAUL
Count = 1
Use Read Range activity → Store it as DtRead
Use For each row activity
Inside the for each row
Variable = "ID"+Cdbl(Count).ToString
Count = Count+1
Regards
Gokul
for each row activity has an output index:
this can be used ootb (it is 0 based) like
“ID” & (indexOutVar + 1).toString
You’re making extra work for yourself. You don’t need the Count variable. That’s what the index property of the For Each Row in Data Table activity does. Get rid of the Count variable and the two Assigns for Count. Go to For Each Row in Data Table, put the cursor into the index property, press CTRL+K and type Count. Change your OutVal assign to “ID” + (Count + 1).ToString
The +1 is because it’s a 0 based index, so the first row would be ID0 without (Count + 1)
How do i write it for a particular coulmn ?
HI @RACHEL_PAUL
Inside the for each row activity
Use Assign activity
Currentrow(“Column name”) = “YourValue”
Outside the For each row Use write range activity
Or
You can try with Add Data Row activity
Regards
Gokul
Not sure what you mean.
Got the ouptut.
Thanks alot!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.