Error:Object Reference not set to an instance of an object

Hi All,

Currently I’m practicing on Bank Reconciliation process. Initially i had read the bank statement and cash book and stored it as DT. Then i have compared all the transaction between cash book and bank statement and stored in four different Data table like as Bank Record Exist & not Exist, cash book RecordExist & not Exist.Then i had write the non matched record in excel for both cashbook and Bank statement.

Now i want to calculate the different amount for both cash book and bank statement. I have list of different amount(non matched) transaction in bank statement like as Bank Interest, NEFT, IMPS, etc… If i had found any transaction apart from this list, i want to update in Withdraw or Deposit column based on the transaction type. i have created the scenario using if and assign activity. But while I running the program an error message is occurred like as “Object Reference not set to an instance of an object”. Kindly advise.

Assign Activity— BSOtherDebitAmt= BSOtherDebitAmt + cint(row.item(“Withdraw Amt”).tostring)

Assign Activity— BSOtherCreditAmt= BSOtherCreditAmt + cint(row.item(“Deposit Amt”).tostring)
image

1 Like

Good morning Baskaran,

This usually means one of the variables you’re trying to use in your assign stage are null.

Are you able to either output to the log or print in a messagebox the value of each variable to ensure they are not null before using them in the assign stage?

Fine
your workflow looks good and i hope your condition itself states that the row(“Withdra Amt”) is not having null value
–then we need to check with the variable assigned before to it i.e., BSOtherDebitAmt
–kindly check whether that variable is assigned with any default value or with any value prior to this IF CONDITION
–and if that BDOtherDebitAmt is assigned with some value make sure that variable is with global scope in the variable panel and not to any specific scope, if so change it to whole sequence
–and to check with the value in the THEN part before to this assign activity use a WRITELINE activity and mention that variable and lets check whether its showing any value or not, but keep this as a last try as the above methods suggested itself will clear this error

and this error usually occurs when the error associated activity has a variable and that variable has no value or null value in it

no worries
you were almost done
Cheers @BaskaranVenkatesan

Hi, Due to some important work i had paused my Bank Reconciliation process. Once I resolved this error i’ll let you know.
Thank you!
Baski