06-12-2020 08:02 AM
7/2/2019
Has anyone ever had a data source that is two columns for the amount and they have to be added together in the file *-1?
06-22-2020 07:46 AM
Dim currentCol As String = args.value
'Define secondary column
Dim Amount As Double = api.Parser.DelimitedParsedValues(2).XFConvertToDecimal
Dim Amount2 As Double = api.Parser.DelimitedParsedValues(3).XFConvertToDecimal
Return Amount + Amount2
01-26-2023 03:30 PM
I had the same question! This is what I found worked:
1) In Data Sources, point the Amount to a row validator column*. This will NOT be the debit or credit amount column of data if that column might contain a zero for a valid row.
2) Update the 'Logical Operator for the Amount = Complex Expression, using the sample code shown below. NOTE: the first column of data is enumerated with a zero, not a one.
Dim DebitAmt as Double = api.Parser.DelimitedParsedValues(12).XFConverToDecimal
Dim CreditAmt as Double = api.Parser.DelimitedParsedValues(13).XFConverToDecimal
Dim NetAmt as Double = DebitAmt - CreditAmt
Return NetAmt
05-25-2023 12:43 PM
Hi,
Could you elaborate what does it mean by a row validator column?
Thanks