modifying sort query on table data prior to sorting?

I have sortable amount columns on my table, and some of them are negative amounts. These are stored in the database as absolute values and there's a transaction_type that indicates whether they're positive or negative. The problem is when sorting the table, it's sorting evidently only by the absolute values stored in the database, so the negative numbers are scattered throughout the table data wherever their absolute value would have them in the sort. I'd like to modify the query prior to sorting so that I can specify which values are negative and can have that taken into account when sorting. Is there any kind of built-in functionality for this, or how can I accomplish this? Is it possible?
0 Replies
No replies yetBe the first to reply to this messageJoin