Solved

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

Posted on 2004-10-05
13
682 Views
Last Modified: 2013-12-18
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.
0
Comment
Question by:kopibean
  • 2
  • 2
  • 2
  • +2
13 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 12225049
Place the above formula in first column and make Sort:Ascending.

This will give what u are looking at.
0
 
LVL 24

Expert Comment

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

~Hemanth
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 12228162
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?
0
 

Author Comment

by:kopibean
ID: 12233161
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.
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 12234896
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.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12238468
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...
0
 
LVL 3

Expert Comment

by:Andrea Ercolino
ID: 12241632
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

0
 

Author Comment

by:kopibean
ID: 12255726
RAPUTA,

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

Please advise.
Thanks
0
 
LVL 3

Accepted Solution

by:
Andrea Ercolino earned 50 total points
ID: 12349447
sorry for not seeing your new question, kopibean... Are you still waiting for an answer?

here is the LS code for an agent that implements 1- and 2-

Sub Initialize
      Dim s As New NotesSession
      Dim db As NotesDatabase
      Set db = s.CurrentDatabase
      Dim v As NotesView
      Set v = db.GetView( "ViewByCategories" ) ' use here the name of your categorized view
      Dim n As NotesViewNavigator
      Set n = v.CreateViewNav
      Dim e As NotesViewEntry
      Set e = n.GetFirst ' this should be the first category
      If e Is Nothing Then
            Print "empty view... exiting"
            Exit Sub
      End If
      
      Dim summary as NotesDocument
      Do While Not( e Is Nothing )
            Set summary = new NotesDocument( db ) ' create a new summary document
            summary.Form = "SummaryForCategory" ' use here the name of your form for the summaries
            ' set all the fields you need, for example
            Call summary.ReplaceItemValue( "Total1", e.ColumnValues( 1 ) )
            Call summary.Save( True, True ) ' save the summary

            Set e = n.GetNextCategory( e )
      Loop
End Sub
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 12711064
RAPUTA got it.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now