Back

How to separate Debits and Credit when the source file has only 1 column

Published: Dec 08, 2011
Post Author Written by Kevin Jones

Using a SmartConnect script to separate debits and credits when your source file only contains 1 column that has positive and negative values.

You need to create 2 calculated fields. One called DEBIT and the other called CREDIT.

Your DEBIT script will look like this:
if _amount > 0 then
return _amount
else
return 0
end if

Your CREDIT script will look like this:
if _amount < 0 then
return _amount * -1
else
return 0
end if

You need to replace _amount in the script with the actual name of the column that contains your debits and credits.

Feeling stuck? Get the support and guidance you need to help you power through any data challenge

We're on your integration team. Connect with our people and let us know how we can help you.