Where to use DateTable in Process Transaction?

Hi There,

I have doubt like, Can we keep ‘Build DataTable’ in Process Transaction RE. If we keep, t will not clear DataTable for each itereration, right ?

And Where can we keep ‘Write Range’ in Process Transaction RE.

Or we should keep ‘Build DataTable’ in InIt RE only ?

Thanks,

Hi @Muralikrishna_Surve ,

For Initialize any variable,Data table, ect.

Init state is preferable.

If you want to write output Data table, you can write it in

end of the process state or Final State.

Thanks!

Can we write output Data table, in ‘Process Transaction’ Final State ?

As there is chances of DataLoss if bot stopped before end state.

If we can, Which activity to prefer ‘Write Range’ or ‘Append Range’ ?

Hi @Muralikrishna_Surve ,

For each transaction you will get some data’s and you need to write it in a excel means,

you can use write range activity inside for each.

For Write range activity Cell range will be

“A”+(yourDT.rows.count+1).ToString

For this case we can avoid data loss

Thanks!

Hi @Muralikrishna_Surve

If we keep the build datatable in Process Transaction then the datatable will recreate for every transaction. If you had added any data to datatable in previous transaction then you loss the data. So we create the datatable in init state.

We can use write range activity in either final state or in no data transition. So that we can write the data to excel after all the transactions are completed.

Regards,

@Muralikrishna_Surve

If you want to write the workbook for every transaction, you can use append range activity. If you use write range activity then the data will be override.

You can use add datarow activity in process transaction to add the data to the main datatable(created in init state).

Later write the datatable to the excel using write range activity in final state.

Regards,