9 Replies Latest reply on May 15, 2013 1:18 AM by GuyStevens

    Portal Sort Descending ... Running Total Ascending

    DeniseDeyholos

      Title

      Portal Sort Descending ... Running Total Ascending

      Post

           I have a Portal which lists investment transactions, and sorts using a global field― Sort By. The column headings are Buttons to Set Field :

           • Date ( D )
           • Transaction ( A )
           • Investment ( A )

            

           The last column contains a Running Total. The calculations are accurate; however, it is always in Ascending order ( top to bottom ), despite the sort order. You can imagine the confusion! At very least, the sort default is Date (D) and if there is a Calculation field I can create using the RT as part of the formula, I haven't been able to figure it out.

           Appreciate the assistance,

           Denise

        • 1. Re: Portal Sort Descending ... Running Total Ascending
          GuyStevens

               If I'm understanding correctly you want to sort according to a summary field.

               In the Sort dialogue there is a function that allows you to "Reorder based on summary field".

               Maybe that could work for you.

          • 2. Re: Portal Sort Descending ... Running Total Ascending
            DeniseDeyholos

                 Thanks for your input DaSaint. Unfortunately, this is not the issue I'm trying to resolve. I don't want to re-order the portal rows, just the Running Total.

                 I suspect I'll have to either discard the RT altogether, or use an Ascending sort order. Since the annoyance of having to scroll down to the bottom of the portal would outweigh the convenience of the summary field, the column may go out the window.

                 Of course, I'm trying to restrain from spending countless hours creating a series of self-joins and calculation fields, and working myself up into a fluster.

                 If there is another option, I'm attaching a grab to make the issue a little clearer. So, I'm still hoping for a solution.

                 Denise

            • 3. Re: Portal Sort Descending ... Running Total Ascending
              RickWhitelaw

                   Hmmm . . .the running total is just that . . . A running total which is determined by the sort order. It will always total record to record. With each record it will determine what the "to date" total is. Perhaps I'm not understanding your question.

              • 4. Re: Portal Sort Descending ... Running Total Ascending
                DeniseDeyholos

                     I know, pretty confusing, huh? The sort order in this instance is by Date, descending. So, the most current total should be at the top. However, the order is being calculated top-to-bottom, with the most current total in the last row. If it were displaying according to Date order, the balances would read ―

                     Row 1 : $  0.00

                     Row 2 : $ 531.04 ‒

                     Row 3 : $ 527.70 ‒

                     Thanks Rick.

                     Denise

                • 5. Re: Portal Sort Descending ... Running Total Ascending
                  GuyStevens

                       I might be wrong here but don't you just need to make a total of withdrawals and a total of deposits and then just calculate the difference to see the current Balance?

                       You can then place this current balance field anywhere you want.

                  • 6. Re: Portal Sort Descending ... Running Total Ascending
                    DeniseDeyholos

                         Well DaSaint,  I already have the current balance; I was looking to see a running total. And the Withdrawals and Deposits are the same Field with conditional formatting ( Self ≥ 0 ; Self < 0 )

                         Considering the creation of two different calculation fields to represent a Deposit or Withdrawal for each line item using Ifs, I don't think that it's going to help.

                         Denise

                    • 7. Re: Portal Sort Descending ... Running Total Ascending
                      GuyStevens
                      What about using a temporary field where you enter the amount. Then either a field to set to deposit or withdrawal or maybe better two buttons. One that says deposit and one that says withdrawal. Then that value gets set in the portal plus the running total is calculated by your script and set in the balance field.
                      • 8. Re: Portal Sort Descending ... Running Total Ascending
                        DeniseDeyholos

                             Well... that would only work if I never have to edit a previous transaction. Just as complicating is that there are just too many other parameters (it's far more complex than a simple Deposit / Withdrawal scenario). To be honest, I think I'm SOL.

                             Maybe it's something that will be resolved in a later version. Thanks for your consideration, though!

                             Denise

                        • 9. Re: Portal Sort Descending ... Running Total Ascending
                          GuyStevens

                               I think the best way to do this would be to have one field for deposits and one field for withdrawals. Create those totals and use them to calculate the current balalce.

                               A creation timestamp is set on every record and if you need a running balance you just create a script that shows you a list view and runs trough all the depost and withdrawal records of that client, sorted by creation timestamp and calculates the running total at that moment.

                               I think it's a bad idea to to put deposits and withdrawals in the same field.

                               But if you would like to change that you could create a loop script that puts all the - values in another field.