If the account balance is positive, then map it to a Liability account; if negative, then map it to an Asset account.
I'm trying to create a logic group for it and put a simple function script in the Value/Exp filed. Am I on the right path? Somehow I can't make it work. Any help would be appreciated. Thank you.
if you want to follow approach with Logic Group you have to create two logic accounts, one for Liability, and the other for Asset. Then you can use Fun Operator and the following Value/Exp:
LAcc_Liab: If CURVAL => 0 Then Result = CURVAL Else Result = "Skip" End If
LAcc_Asset: If CURVAL < 0 Then Result = CURVAL Else Result = "Skip" End If
Then in your mappings you can map both logic accounts to your specific target accounts.
You will have to choose Simple/Complex group based on your reqs but if they only refer to Account you can use Simple.
I hope that helps.
If CurVal<0 Then Result=CurVal Else Result="Skip" End If
I used this and it created a duplicated account while the balance is negative.
Then I have 2 rows for the same record, one with the original account and one with the logical account. How can I replace the original account if balance is negative? I can probaby add an import script. But is there an easier way through logic group? Thanks.