How to update add data row dynamic

Hi,

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

Hi,

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

Teo

i want it to update dynamically

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

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

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

Thank you i will try this out

i am not getting can you guide me more

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”

LMS_Tracker.xaml (35.2 KB)

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

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.

select_row(0)(assign.Tostring) = β€œL”

i am getting same exception :frowning:

dtSelect.xaml (11.1 KB)

3 Likes

i am using build table

can we make (DataRow dr= Dt.Select(β€œEmpID=123”)dynamic empid keeps changing

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

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

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