Error -Calculate Client Security Hash- Get transaction Data error

in Calculate Client Security Hash assignment, getting below error in the assign part out_TransactionItem("WIID)
“**cannot create an l-value from the given expression with property ‘set_item’ because target object is null **”
I got in_TransactionNumber =1 and in_WIList.count=12
But stuck with assign. can anyone help with this error

what should be the output for out_TransactionItem(“WIID”)

out_TransactionItem(“WIID”).toString will give your the current WIID that you are going to process.

On the error i would need more information.
Which assign has failed the above one?
What are you doing in that assign?

Hey @jessar98

Try to writeline your assignment value before assign statement and check your value is coming null or empty?

Regards…!!
Aksh

1 Like

Hi, I am getting the same error. When I casted the value, “in_WorkItems(in_TransactionNumber).ToString”, to a message box, it returns “system.data.datarow”.
Can you please assist, @aksh1yadav and @nadim.warsi?

if in_WorkItems is of DataTable type then what you are getting in message box is correct.
You cannot print the whole datarow as a string.

Can you please let me know what you are trying to achieve?

Does this mean that the value of in_WorkItems(in_TransactionNumber) is null?

The error I am trying to resolve is
“Assign Transaction Item: Cannot create an L-value from the given expression with property ‘set_Item’ because the target object is null.”

variable%20assignment

I am not sure where I am going wrong. I checked the arguments importing, and it’s correct and being called into the workflow. Other than that I am not sure how else to troubleshoot

It dosent mean its null. It just that you cannot print and see the value of a datarow it will simply print ‘system.data.datarow’

Just do in_WorkItems(in_TransactionNumber). remove the toString

Thank you, I tried that. I am getting the same error.
Good news, I figured out why. in_TransactionNumber is null even though I gave it a default value of 0.
Do you know how I can fix this?

check you invoke for GetTransactionData, are the arguments all mapped?

Yup, Below is a snip of how I mapped it. The in_TransactionNumber is defaulted to 1, should I change it to 1 within the GetTransactionData workflow?

then its fine. You dont need to set default value to your argument.
It shouldnt be null.
Can you print our WIList.Count.toString at the top of the GetTransactionData flow to see if it holds any value during execution

I got the value of 14 as the output…not sure why it’s not passing correctly

If you can debug, you can check what value its holding after the if and see if its actually null.

I tried debugging.
The log message is “The Value of out_TransactionItem is " + out_TransactionItem(“WIID”).ToString +” The Value of in_TransactionNumber is " +in_TransactionNumber.ToString + " The value of in_WorkItems is " +in_WorkItems(in_TransactionNumber).ToString

you need to add the log after the assign :slight_smile:

I put the log message after the assign however the debugger is not reaching it since it bounces back up to the try-catch before ending.

This is what in_WorkItems is holding…can you confirm if this is what it supposed to have?

DataRow[14]
{
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“381225”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-05-16”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“583225”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-02-06”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“483985”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-03-17”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“384585”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-05-03”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“656725”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2018-03-04”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“921105”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2018-09-28”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“670085”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-05-02”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“922865”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-03-14”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“981885”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-03-13”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“654685”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-12-10”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“958905”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-07-30”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“270695”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-11-22”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“756785”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-03-04”
},
RowError="",
RowState=Added,
Table=
},
DataRow
{
HasErrors=false,
ItemArray=object[6]
{
“”,
“497125”,
“Calculate Client Security Hash”,
“WI5”,
“Open”,
“2017-07-29”
},
RowError="",
RowState=Added,
Table=
}
}

Looks fine. its supposed to have the datarows for WI5.
Are yo still using toString in the assignment?

No,
out_TransactionItem = in_WorkItems(in_TransactionNumber)
within the assign.

GetTransactionData.xaml (9.2 KB)

1 Like

The issue is this :slight_smile: Which you are not able to see unless you click/over it
out_TransactionItem("WIID") = in_WorkItems(in_TransactionNumber)
You dont need WIID on the left side of the item as thats not correct

Also you dont need to default the transactionNumber to 1 again inside your workflow.
Actually you can set the value to 0 in the Main

1 Like