Listing in Date Order

supastar69
supastar69 used Ask the Experts™
on
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")
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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

Author

Commented:
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
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

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

Author

Commented:
Ok thanks!! i will try this  !
Commented:
First things first.  You don't need to nest @ReplaceSubString.  Instead of

  @ReplaceSubstring(@ReplaceSubstring(@ReplaceSubstring(@ReplaceSubstring(@Subset(@DbName; -1); "%"; "%25"); " "; "%20"); "+"; "%2B"); "\\"; "/")

Use

  @ReplaceSubstring(@Subset(@DbName; -1); "%" : " " : "+" : "\\"; "%25" : "%20" : "%2B" : "/")



Second, you shoudl just display the view directly, and have the name and date as separate columns.  Use the column sorting option, "Click on column heading to sort" to alow the user to select what order to display in, by name or by date.

Author

Commented:
Ok thanks i will give it a try

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial