Dear Masters, Unable to update data in build data table using Add data row activity

Here I am using the RE framework.I want to take input from excel(company names) and put it on the website, get share prices, and write in excel.
In the process state, I am using the Build data table and ADD data row, but in the output file, it is updating only the last transaction data instead of all. Please help me in this regard. Tq

Hi @lakshmi_narayana_ch ,

Try moving the Build Datatable Activity to Init State and pass the Datatable from Init State to Process State using Arguments with Direction as In/Out.

As you are using Build Datatable in Process State, the Datatable is getting initialised repeatedly and hence only the last data is appended to the Datatable.

We could apply other strategies but let us know if you are able to use the mentioned Strategy and provide us with a feedback.

@lakshmi_narayana_ch your datatable storing only las row.
Put build datatable activity before process transactions.
When you start Transactions and you are building dataTable inside it. Every Transaction will initial it so in last you will get only that data which is processed by last Transaction.

->To avoid from in pass a io_DataTable “io” means in/out. And remove build activity from inside Transaction processing use before Transaction processing.

It’s working, But any system exception comes. its is ignoring previous data.

Hey @lakshmi_narayana_ch,

Try it this way:

In Init State, in first run, build the data table, the scope of datatable variable will be general business process, in the Process workflow, make an Argument in/out of datatable type and pass that datatable which you build in init state in it.

Now whatever you want to do, do in the process workflow with the datatable argument. This will hopefully fix your issue.

In case of any confusion pls do let me know.

BR,
Ahmad

@lakshmi_narayana_ch what type of exception is coming. Can you show us

Take a look at this post, most likely you’re facing the same issue (instead of dictionary, you can apply the same rules to your DataTable)

hope it helps!

@lakshmi_narayana_ch ,

Slight modification from my earlier Statement, as mentioned by @ahmad.sultan , Place your Build Datatable Activity inside the First Run part of Init State, It is an If Condition.

This should retain the extracted data in the datatable, as previously with System Exception it is also traversing through the Init State and thereby again initialising the datatable.