How to update add data row dynamic


#1

Hi,

How to add data to add data row dynamically its taking sequential


#2

Hi,

Can you provide more details? What do you mean by “add data”? Are you talking about referencing the latest added row?

Teo


#3

i want it to update dynamically


#4

You can try Add data row activity and in the array row property you can pass the row values.

{"","","","","","",rowval1,"",rowval2,"",""} just left that column which you wants to make blank.

Regards…!!
Aksh


#5

i may need all 31 column
person apply for leave from 1 to 31 in any of the date


#6

Can you do Select Row based on Emp ID (or any unique ID) to get the Row

DataRow[] dr= Dt.Select(“EmpID=123”);

Since you have From and To range

you could do while loo

Count = Fromvalue

While Count<=ToRange

dr(0)(Count) = "L"
or

dr(0).Item(rowVal) = “L” (— rowVal = (Count-1).Tostring

Count= Count+1


#7

Thank you i will try this out


#8

i am not getting can you guide me more


#9

VWhat part you are having trouble with?Please share your xaml.

Select statement selects the employee record

While loop updates your datatable columns based on your date range.

dr(0).Item(colname) = “L”


#10

LMS_Tracker.xaml (35.2 KB)


#11

Hi,
is this the thing you told or i need to do any changes in it


#12

Can you convert assign variable from int32 to string before passing to assign activity (or add tostring), because when you pass int32 it will be Index value, rather you need to pass the column name. I assume your column names are 1 2 3…31.


#13


#14

select_row(0)(assign.Tostring) = “L”


#15

i am getting same exception :frowning:


#16

dtSelect.xaml (11.1 KB)


#17

i am using build table


#18

can we make (DataRow[] dr= Dt.Select(“EmpID=123”)dynamic empid keeps changing


#19

you should use foreach loop of your excel rows and keep the logic inside that.


#20

i have used for each loop but iam getting array out of bound exception

dr(0)(count)
its printing in 0th row