What activity can be used to modify the value of an existing cell in a DataTable?

What activity can be used to modify the value of an existing cell in a DataTable?

A. Add Data Column Activity.
B. Add Data Row Activity.
C. Assign Activity.
D. Modify Cell Activity.

Thanks
Krishna

1 Like

Assign Activity

1 Like

Hi @krishnareddy

Go through these you will find a solution

Thanks,
Prankur

assign activity
dattable(row)(column) = [you value]

1 Like

Hi @venkat4u , @PrankurJoshi

I have created a datatable using build data table activity.
And now I am trying to insert values in the datatable using Assign activity.
However I am not able to assign, getting error “Assign: Category val in DT: Cannot create an L-value from the given expression with property ‘set_Item’ because the target object is null.”

This I think is because of DataTable not getting identified.
Is there a way to specify the size or number of rows to a DataTable?
Build_DT

Can you attach a sample? What are you assigning?

1 Like

Hi @PrankurJoshi,

I am trying to insert values string and Integer
Sample_insertDT.xaml (9.6 KB)

Sample_insertDT.xaml (11.8 KB)
attached the file

You have to use Add Data Row activity, as you can only assign some value to a cell if row is already there.

You are assigning a value to a specific cell but there is no row exists in the data table, so you will have to first add a row to table then you can update the cell value.

Thanks,
Prankur

5 Likes

Thanks . Yes adding an empty Data row before assign helped!

2 Likes