Show opposite sign in Dataport

In my dataport on the Vendor Ledger Entry table there’s a field ‘Amount’, which has a minus sign(-) for positive amounts, and vice versa. When exporting this field to a textfile I would like to have this decimal made absolute. I tried by simply adding ‘*-1’ (I tried both the code behind the field (OnBeforeEvaluateField) and directly into the field properties’ SourceExpr), but that doesn’t seem to do the trick. The result always is 0. Any ideas?

Have you tried to put ABS(Amount) in the Dataport’s Field Designer instead of just Amount?

quote:


Originally posted by nelson
Have you tried to put ABS(Amount) in the Dataport’s Field Designer instead of just Amount?


Hi Nelson, I just did. result is 0!

Then you forgot to tell us that you are using a 3.xx version! [:p] The Amount field in the Vendor Ledger Entry has been changed into a FlowField that looks into Detailed Vendor Ledger Entries. I really should have noticed when you said that multiplying by -1 was not working. In this case leave the ABS(Amount) but include a CALCFIELDS(Amount) in the OnBeforeExport trigger.

quote:


Originally posted by nelson
I really should have noticed when you said that multiplying by -1 was not working.


I won’t blame you for that! It works fine the way you described. I only was mistaking when I said that i would want the Amount to be absolute; psoitive should be negative and vice cersa, so i will use the ‘*-1’ instead of the ABS. Thanks!