Is it possible to assign Data Row[] to Data Row?

I have data scraped a web table and using SQL query stored the data as datarow. Since I want my transaction item to be a data row, how can i make use of the extrct_list to assign to out_transactionitem in GetTransaction data using REFramework?

1 Like

@amr07 if your output is data table split the data table into array of datarows like below.

Datarows arr = datatablevariablename.Select()

Whenever control comes to Gettransaction data

out_transactionitem = arr(TransactionNumber)

TransactionNumber is inbuilt variable. Make this variable is incremented everytime before coming to GetTansaction data state. You can increment this variable in success transition from process state to get transaction state.

sorry,may i ask if my transaction number is of type int how can i assign the value to out_transaction item which is of type datarow and i want the extrct_list(data row) column 1 value to be assigned to out_transactionitem so that it iterates over and over until the transaction item is empty.

NB:Here my transaction item and Out_transaction item is of type datarow.

@amr extrct_list is array of datarows.

extrct_list(0) gives first datarow in that array

1 Like

Thank you.Unfortunately output shows as system.Data.DataRows

@amr07 You can display the datarow value directly. U have to use column index to get particular column value in that datarow like below.


Above statement will give you value from 2nd column in that particular row.

Thank you that worked.sorry to trouble you again one more query how can i assign the value Extrct_list(0)(1) as a data row to out_transactionitem?

@amr07 u have to assign Extrct_list(0) to out_transactionitem Not Extrct_list(0)(1) which gives object as output.

Above one gives output as datarow

Correct : out_transactionitem=Extrct_list(0)

Incorrect : out_transactionitem=Extrct_list(0)(1)

Thank you very much works like a charm.Assigned as you mentioned,however when tried to writeline the same it shows only row.Is it a normal behavior?However it gets updated in the queue.

@amr [quote=“amr07, post:9, topic:89318”]
,however when tried to writeline the same it shows only row.Is it a normal behavior?
That is normal behaviour u can’t display datarow

Thank you for your time on this.

1 Like

@amr07 No problem bro

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.