Page 1 of 1

Change Sort Order View based on time stamp?

Posted: Fri Jan 26, 2007 12:03 pm
by tonylagrassa
Hello All,
Is there a way to change the sort order to display who logs in first, second ect? We work in an office in which sales reps come in and whoever is first gets the first call and then on a rotation basis from there ie:

Bob 8:00
Tim 8:02
Joe 8:03

Any ideas?

Posted: Fri Jan 26, 2007 2:58 pm
by davidyin
Let me show you how to mod it.

1) Open default.asp in any text editor.
2) About line 275, find
if orderby <> "userfirstname" and orderby <>"recordstatus" then
and replace it by

Code: Select all

if orderby <> "userfirstname" and orderby <>"recordstatus" and orderby <> "recordaddon" then
3) Line 462, find

Code: Select all

<td  width="160" align="center" class="rightline style12px">Updated</td>
and replace it by

Code: Select all

 <td  width="160" align="center" class="rightline style12px">
				   <%
				  if request.QueryString("groupid") <> empty then
				  	if request.QueryString("locationid") <> empty then
					orderbytime = "default.asp?order=recordaddon&locationid="&request.QueryString("locationid")&"&groupid="&request.QueryString("groupid")
					else
					orderbytime = "default.asp?order=recordaddon&groupid="&request.QueryString("groupid")
					end if
				  else
				  	if request.QueryString("locationid") <> empty then
					orderbytime = "default.asp?order=recordaddon&locationid="&request.QueryString("locationid")
					else
					orderbytime = "default.asp?order=recordaddon"
					end if
				 end if
				  %>				  
				  <a href="<%=orderbytime%>">Updated</a></td>
4) Save it. you may find the link to sort by time.

Awesome. . . Works liks a charm

Posted: Mon Jan 29, 2007 1:45 pm
by tonylagrassa
Thanks again

Can this action be the default?

Posted: Thu Feb 01, 2007 8:11 am
by tonylagrassa
Can this change be used as the default view?
ie it will show who's is as the default view

Posted: Fri Mar 02, 2007 4:05 pm
by davidyin
You can change it as you like.