In Client security hash assignment we are getting "Assign TransactionID: Index was outside the bounds of the array", what will be the solution for this error

Attached exception message details.

“message”: “Assign TransactionID: Index was outside the bounds of the array.”,
“level”: “Error”,
“logType”: “Default”,
“timeStamp”: “14:34:04”,
“processVersion”: “1.0.0”,
“jobId”: “fc71ebba-af7c-4880-bba6-9d979deaeae5”,
“robotName”: “ReRobot”,
“machineId”: 194215,
“fileName”: “GetTransactionData”

Hi @achudina,
I’m not sure if I good remember but there is a part in walkthrough document where it’s mentioned that indexing is going from 0. Not sure if this applies to Transaction ID but you can try to do " - 1" in the assign formula. Eventually just add additional Write Line activity with this TransactionID parsed to string and you’ll see which values it will return.

Hi @Pablito

Thanks for your quick reply, i tried to debug my code and found exact place where i got the error.
In GetTransactionData Framework we are checking whether the transaction number is less than or equal to count of work items
Once loop is true we are assigning Transaction ID like
out_TransactionItem = dt_WorkItems(in_TransactionNumber)
in Arguments i set default value for in_TransactionNumber = 0 but i can’t able to set default value for out_TranactionItem where i got the outofBoundException
PFB screenshot for reference.

It will be probably as I said in previous answer. You are assigning to out_TransactionItem the data table dt_WorkItems. From definition DataTable is counting it’s index from 0 not from one so in dt_WorkItems(0) there is the first value. I guess you should try to assign values starting from dt_WorkItems(in_TransactionNumber) -1.

Hi @Pablito

Even though i added default value as -1 , still showing the same.
Attached my project zip file (1.1 MB)

Thanks & Regards,
Dinesh Kumar.A

Don’t assign default value “-1” to variable. You need to assign to out_TransactionItem the whole thing you have and “-1”.

out_TransactionItem = dt_WorkItem(in_TransactionNumber) -1
1 Like

this error i too was getting but could’nt assign as you said

In variables panel assign TransactionNumber as 1,
and then in assign use below code,
out_TransactionItem = dt_WorkItem(in_TransactionNumber-1)

but after doing the same thing as you said its not solvedimage

Remove the “out_TransactionItem =” from that.
Because of that you were getting error.
Just keep,
dt_WorkItem(in_TransactionNumber-1) in that.

ok after removing its not showing error i wish it should work now

Any errors???.. @sourav_singh

yeah again this samre error but just as it opened sha1 online website

now toh even not extracting hash data

hello @manish help with this error

selectors issue, use the below selectors in get text,
“webctrl tag=‘SPAN’ parentid=‘sha1-title’ innertext=‘*’ />”

but in get text perhaps no requirment of selector but afterall i used it but it was showing error