How to get first column cell and the one below


#1

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’


#2

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


#3

so i can just read the entire table?


#4

but i dont want it to read the department itself too


#5

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 workflow.ReadColumn.zip (7.5 KB)


#6

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


#8

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


#9

declare dept
for each row

dept=row(1).tostring

it will copy department1 to dept variable in first loop


#10

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


#11

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


#12

is this flow correct?

Subtotal.xaml (10.3 KB)


#13

Subtotal.xaml (9.7 KB)

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