Link to home
Start Free TrialLog in
Avatar of kopibean
kopibean

asked on

Total time(mins) column to be display in descending order in view

I have created a view and there are 6 columns in this view.
Category    Month    Date    Total Cases   Duration   Total Time(mins)

I would like my total time(mins) column to be the 1st column and the time which is highest to be display in the first row then second highest in second row.
My formula for my total time(mins) :
xDif := @If(to>from;to-from;from-to);
Hour := @Integer(xDif /3600);
Min:= @Modulo(xDif; 3600)/3600;

Tot := @Integer((Hour + Min)*60) ;
Tot

Second column to be Category which will be corresponding to total time in 1st column
Thus, I would like my view to be like this :
Total time(mins) Category      Total Cases    
950                   Trouble         20                
600                   Project          10
500                   Daily              8
445                   Upgrade        12
334                   Others           20

Thus, how do I configure my view?
Pls advise.
Thanks.
Avatar of madheeswar
madheeswar
Flag of Singapore image

Place the above formula in first column and make Sort:Ascending.

This will give what u are looking at.
Avatar of HemanthaKumar
HemanthaKumar

Make the column type a number from column settings.. this will then honor the asc/desc order set on the col sort.

~Hemanth
I don't know why you have a question.  Do you know how to move columns around or create new columns?  Do you know how to set sorting options?
Avatar of kopibean

ASKER

i guess i ask my question in a wrong way.
I have the view sorted but the problem is
Total time(mins)      Category        Total Cases
5.000                     Trouble               3
                             Trouble
                             Trouble
14.000                   Daily                   4
                             Daily
                            Trouble
                            Trouble
9.000                    Trouble                1
14.000                   Others                 1

The time is still not sorted in ascending order.For my total time(mins) column, I have it total up the time for the total no. of cases to display in the view.

Thus, is there anywhere wrong?
Pls advise.
Thanks.
I don't know what exactly you are looking at.

Based on my assumptions, the first column should be categorized(TotalTime) and Total cases should display no.of items under that category.
If the above assumptin is correct, then for first column(totalTime), make it ascending categorized and numeric.
For the totalCases, default value should be 1. this will show no.of cases per totaltime.
Yes it is wrong.. the sorting is done alphabetically !!

You have to convert the value to number and set the col setting as number. Then sort will be as number sort...
Are you trying to get totals for categories (in a categorized view) sorted? No way!!
NotesViews calculate totals for categories, but do not sort them.

So if you need it anyway, you have to
  1- navigate the categories in the non-sorted but categorized view (by means of the NotesViewEntry... classes)
  2- create a new document for each category with a field to record that total and a field to record that category
  3- add a non-categorized view for showing the new documents with a sorted column for the total field

RAPUTA,

how do I proceed to do your solution 1 and 2?

Please advise.
Thanks
ASKER CERTIFIED SOLUTION
Avatar of Andrea Ercolino
Andrea Ercolino

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
RAPUTA got it.