How count a number of iterations in a for each

datatable
for

#1

how count a number of iterations in a for each, i try activity assign counter = counter + 1 but the output is 1 always


#2

Hi,
Do you have a screenshot of what you’re working with?

counter=counter+1 should be inside the For Each at the start ideally. And, it should be of Integer type.


#3

Put counter = 0 outside for each
and
counter = counter + 1
inside for each


#4

thanks


#5

And how to get the last counter result,if i need the data some where else like excel or in a message box etc?