Forum Discussion

KurtMayer's avatar
KurtMayer
Contributor
1 day ago

How can I force a delimited data source to not skip blank values in an Amount field?

I have a situation where I'm trying to load trial balances from QuickBooks. The source file I'm receiving has three comma-separated columns - Account+Description, Debit, Credit.

QuickBooks has a quirky output format where some debit balances are shown as "$-" (presumably to represent 0.00), leaving the credit column blank.  If there is a credit value in the credit column, the debit column is blank.  This is messing with OneStream's numeric processing of the Amount column when Amount is mapped to Column 2 (Debit column). It is rejecting the "$-" field values and the blank field values as Non-Numeric Amounts (verified in the XFL log file for the load).

I can successfully replace '$-' with 0 using the Substitute Settings in the data source's Amount dimension, but I cannot figure out how to replace 'no value' in the Debit column with 0 (so that the valid Credit column values don't get skipped).  I'm using a Parser Business Rule to return the net amount (debit column 2 minus credit column 3) for the Amount value, but the records where the Debit column is blank never make it to the parser rule (e.g. accounts 1170, 2000, and 2002 in the screen capture of the source file) because of OneStream's built-in Non-Numeric Amount preprocessing.  I've tried various combinations in the Substitution Strings settings, hoping to find one that replaces the empty field with '0', but with no luck.

I've tried all of the following Find combinations (the '$-' does successfully produce a 0 by the way). And yes, I know the documentation lists |Null| as a valid Replace value, not a Find value, but I thought I would try it in the Find string just to see if it worked:

$-^

^$-

|Null|^$-

$-^|Null|

1 Reply

  • JJones's avatar
    JJones
    Icon for OneStream Employee rankOneStream Employee
    Can you give this a shot in a Parser Rule:
     
    Dim defaultValue As Decimal = "0.00"
     
    'Check the source value that was parsed
    If args.Value.Length = 0 Then
    'Nothing was found on this row, so return the default
    Return defaultValue
    Else
    'This line has a value, so just return that value
    Return args.Value
    End If