Workflow error
Hi All:
I have created a new Datasource of Trail Balance which is excel source. I have written a complex expression in the logical operator. the logic is, if there is an amount in the debit column, bring that amount in, but if debit column is blank, bring the credit amount ((not negative)) in as a credit amount. I have below DataSource connection:
the code in the Logical operator:
Dim debitColPosition As Integer = 2
Dim creditColPosition As Integer = 3
Dim AmountDR As String = api.Parser.DelimitedParsedValues(debitColPosition)
Dim AmountCR As String = api.Parser.DelimitedParsedValues(creditColPosition)
If (IsNumeric(AmountDR) AndAlso Not AmountDR = "0") Then
Return CDec(AmountDR)
ElseIf (IsNumeric(AmountCR) AndAlso Not AmountCR = "0") Then
Return CDec(AmountCR)
Else
Return 0.0
End If
when I am running through workflow, the source is trail balance file. I am getting the below error. any suggestions please if anything I am missing here.
Error:
Unable to execute formula. Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index