VI General Journal total debits and assign credit account number

SUGGESTED

I'm trying to import a journal entry. I've calculated the Debit Account number by combining other fields to make the complete account and that works.

Now I need to total all the debits to get the credit amount and then assign the credit account number.

I tried in fields 16 and 17 to "Sum(debits)" and assign the account number if the credit amount <>0.

that does not work.