Link to home
Start Free TrialLog in
Avatar of supastar69
supastar69

asked on

Listing in Date Order

I have designed a survey in Notes/Domino - what i need to do is - for the sales manager produce these responses and list them in DATE ORDER - at the moment all i have been able to do is list them in NAME ORDER - the name being the person's who has completed the survey.

Some relevent code which i am using at the moment is :

dbase := @ReplaceSubstring(@ReplaceSubstring(@ReplaceSubstring(@ReplaceSubstring(@Subset(@DbName; -1); "%"; "%25"); " "; "%20"); "+"; "%2B"); "\\"; "/");
url := "/" + dbase + "/Key/" + URLKey + "!OpenDocument";
t := "";
AnchorText := "Questionaire" ;
"[<a href=\"" + url + "\"" + t + ">]" + AnchorText + "[</a>] was saved at " + @Text(@Modified; "S2D0T1")
Avatar of HemanthaKumar
HemanthaKumar

Question is kind of vague! How is this results generated ? What does the html code above does ?

Are you using view to display the result. If so include the Date Order in one column and sort it ascending. If you don't want to show the column but still preserve the sort then hide the column.

~Hemanth
Avatar of supastar69

ASKER

The HTML code loads up the questionnaire results on a separate page, And yes i am using a view ! The code which i gave was from one of the columns in the View.  What that does is that it just displays a link to all qustionnaires that have been completed. I will give the url http://www.cs.salford.ac.uk/work/sem1/rsoomra/IceCream.nsf ( if you choose 'Login' and enter username 'joe genius' and password 'Genius' )

Then once here you can view the DATE ORDER link - these are the results which i need to get into date order !
Ok this is possible using Javascript.

Let me give it to you in a sec
supastar69,

I have some difficulty in date field to get sorted in conjunction with strings in Javascript.

I have another method that I think might be more efficient.

Are you using R5 or R6 ?

If you are on R6, use @Sort function to do this. Or else in R5 follow this method

Create a view with Modified date in the first column sorted and second column with formula

dbase := @ReplaceSubstring(@ReplaceSubstring(@ReplaceSubstring(@ReplaceSubstring(@Subset(@DbName; -1); "%"; "%25"); " "; "%20"); "+"; "%2B"); "\\"; "/");
url := "/" + dbase + "/Key/" + URLKey + "!OpenDocument";
t := "";
AnchorText := "Questionaire" ;
"[<a href=\"" + url + "\"" + t + ">]" + AnchorText + "[</a>] was saved at " + @Text(@Modified; "S2D0T1")



When you click the Date order link open the above view, if it is another just open your existing page or create one more view which is quite opposite of what we created in last step.

Us $$ViewTemplateDefault form with $$ViewBody field in it. So that you can embed your home links and other heading stuff.

Hope this helps

Ok thanks!! i will try this  !
ASKER CERTIFIED SOLUTION
Avatar of qwaletee
qwaletee

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
Ok thanks i will give it a try