How to get first column cell and the one below

Hi all,

I would like to get the first cell for DEPARTMENT and the subsequent one using assign,
how do i do it?

Basically i want
Assign first variable to first cell of department, which would be ‘DEPARTMENT1’
Assign second variable to the increment of DEPARTMENT1 which will be ‘DEPARTMENT2’

row(1).ToString inside “for each row” it will select “department” cloumn

so i can just read the entire table?

but i dont want it to read the department itself too

You can read the enitre column and iterate through it in a for each loop to get the each cell. Please see the attached sample (7.5 KB)

1 Like

use coumn number row(0) for “s/n”, row(1) for “deparments” so on based on ur requirement

how do i automatically add + 1 so that it will read the cell below?

declare dept
for each row


it will copy department1 to dept variable in first loop

got it! thanks! how about auto adding +1 to get ‘DEPARTMENT2’?

inside for each row it automatically takes “department2” in 2nd iteration of loop,
in 3rd iteration of of loop “department3” and so on it automatically takes next row in datatable

is this flow correct?

Subtotal.xaml (10.3 KB)

Subtotal.xaml (9.7 KB)

I have made few changes please check it and run it if u have any doubt. Please comment again