I have imported a bank statement as a csv file. The value in the amount field is both positive and negative , for credits and debits. I want to put the positive in a field named Credits, and the negative in a field named Debits. Is there a way to separate the amounts field and fill two new fields in this fashion?
Dave’s suggestion is perfect, and is probably the way to do it. But just for fun, I’m going to suggest a couple of other possibilities. These aren’t better (or worse) than Dave’s code, just different.
field Credits
select Amounts > 0
formulafill Amounts
field Debits
select Amounts < 0
formulafill Amounts
selectall
Here is another method:
field Credits
formulafill zeroblank(max(0,Amounts))
field Debits
formulafill zeroblank(min(0,Amounts))