Error in Rows

Hii,

what is the mistake?

Thanks and Regards,
Supriys

@supu123,

Remove double quotes for output_DT dataTable variable and then try.

Hii @lakshman

Thanks and Regards,
Supriya

@supu123

May I know with this expression, what are you trying to achieve it ?

Could you please tell more details.

Hii @lakshman

I have built a datatable as follows

Now i want to inert “values” of these using add data row

The values are present in a string variable and values has to be stored in there column
examble if keyword is the column in build datatable then in_keyword is the variable that has dynamic values need to be stored in the column of keyword one by one


I am trying to achieve this

Thanks and Regrads,
Supriya

@supu123,

You can use Add DataRow activity to add values into the above dataTable created by Build DataTable. And pass below in Add DataRow activity.

ArrayRow: {in_keyword,in_case number,in_from,…}
DataTable: output of Build DataTable actvity

Hi Supriya,

I noticed that you are entering to(outargument) and value (inargument) in value field.
change the fields in assign activity
To= output_DT.Rows(“output_count”).Item(“Keyword”)
value= in_keyword

Hii @lakshman

The above steps is not allowing me to write the nxt value of in_keyword in next row of column keyword .

Thanks and Regards,
Supriya

Hi @Sreelatha278

Did it but the same above error is shown

Thanks and Regards,
Supriya

@supu123

Please share the screenshot

Hiii,

Thanks and Regards,
Supriya

Hii @Sreelatha278
Please help me out with the above process.

Thanks and Regards,
supriya

Hi @supu123,

I think it is datatype mismatch.
Please check whether output.DT.Rows(“output_count”).Item(“keyword”) will return string or integer.
Also, check the datatype of LHS.

To convert to string:
A.Tostring() , assuming A is an integer
To convert a string to integer:
Convert.ToInt32(B), assuming B is a string

Hi Supriya,

May I know what is “To” field contains in assign activity?

Hii MSLReddy,
String datatype variable

Thanks and Regrads,
Supriya

Hello Supriya,

have a look on the screenshot, may be it helps you.

Hii,
What is Rows(2) doing here

Thanks and Regards,
Supriya

instead of output_count ,I hardcoded the value.

this assign statement is used to add a single value of particular row and col in datatable.

If you want to add complete row in datatable, use add datarow as suggested by lakshman.

Hii,
My question is how to increment to next row in the solution suggested by lakshman.

Thanks and Regrads,
Supriya

Hi Supriya,

AddDataRow will append the datarow to datatable, so no need to increment.

if you want datarow in recursive, use looping.

1 Like