Adding data query

Hi, I am having a query. Please see the attached snapshot.
I have created a data table. If you see my Sequence is first S. no | Name | Position

And I am adding the data in the same sequence like image , here the data is adding perfectly. Now if you see tomorrow I have added new field or change the sequence like Name | S. no | Position

So my Name will come under Name section and same for other. How to resolve this issue.
This is the issue
@Palaniyappan @lakshman @Lahiru.Fernando @ImPratham45 @KarthikByggari

1 Like

How are you adding data to the datatable?

Also what is the actual issue you are getting? Data isnt being added correctly or you are receiving an error message?

1 Like

Thanks for the quick response. I am adding the data and data is added correctly, but my concern is If I change the sequence of the dataTable columns headers. I want to add the data in a specific column only. hope you understand. This sequence will remain same. If I want to add so next to the position name I will add.

See both the snapshot in pic. Column Headers Seq is changed. But in the second pic I am getting the Serial No under the Name ???


You had change sequence in build data table but you have to change sequence in add datarow or datascraping activity. whichever you use.


1 Like

Use the column name to add the data…

1 Like

From where you add data
say if it comes from website or something
then while adding it to datatable use Columns name as @Manish540 says…

1 Like

So as @Manish540 suggested, use column names to directly insert into the correct column.

i.e. Datatable.Rows(0).Item(“Name”) = Value

1 Like

Hi, I don’t want to change the sequence in the Add Data Row.

Only my sequence can be change in Data Table.

So this is the issue, Without changing a seq in Add Data row how can I add the data in specific field.

1 Like

I m back
That’s not possible buddy
See usually the way data is added can be modified easily to a fixed place like datatble kind of data structure
So may I know why you don’t want to change the way add data row is added
Cheers @balkishan

1 Like


Create one Datarow variable (ex Dr as Datarow).
use assign activity for each column like dr(“Name”) = “Johan”

after that Add Data Row Activity use DataRow instead of ArrayRow (in DataRow give dr variable).

check with this solution may be its work.


Thanks Palani for the response. Like in future I will have to add a new field, So I might not be added in the last, I have added somewhere. Like in the begning of the seq, So I want my data will be add under the same column name.
Ex. Suppose Name is on the first number. If my Name will go to the fourth number so I want to add all Name data under the Name column not diff.

1 Like

from Variable

my data is coming from the variable, so it might not possible to put the Same data table column name with the Variable name. Hope you understood.

[quote=“balkishan, post:11, topic:170210”]
Suppose Name is on the first number. If my Name will go to the fourth number so I want to add all Name data
You already got the point that we need to change the position of data while giving input
Let me tell the you possible ways of doing
If we want to add the data irrespective of the position of the column then the possible way is using a simple assign activity like this
row(“yourcolumnname”) = “your value”
Similarly for all the columns use assign activity
Because as we have used just column name the value will be added to those columns irrespective of its position

But with add data row either we pass by array row or Datarow we need the sequence of data to be passed in a predetermined way

Cheers @balkishan

1 Like

So instead of datarow in add data row activity,
create an array in which ever order you want {Name, Designation, S. no} etc. and then use that instead?