Default Sort Order Lastname?

Basic Installation and Setup.

Moderator: davidyin

Post Reply
mealan
Members
Members
Posts: 3
Joined: Tue Oct 23, 2007 7:58 am

Default Sort Order Lastname?

Post by mealan »

i have tried but everytime i think i get close i make a internal 500 error. so i am asking for help, anyway to set it so that the default order is lastname and not how it does it currently?

Thanks!

and thanks for a great product, it is exactlly what we need.
Thans for the great product!

User avatar
davidyin
Members
Members
Posts: 181
Joined: Wed Apr 27, 2005 10:50 pm
Location: Burnaby

Post by davidyin »


mealan
Members
Members
Posts: 3
Joined: Tue Oct 23, 2007 7:58 am

Post by mealan »

nah not that, i mean when there is no default.asp?order=userlastname it sorts based on user id, i would like it to sort on username by default if there isn't a order=? string in the url.

thanks for your help, i see you help out here all the time, and so just thanks.
Thans for the great product!

mealan
Members
Members
Posts: 3
Joined: Tue Oct 23, 2007 7:58 am

woohoo, got it working

Post by mealan »

here is what i did to get it to work the way i wanted.

i added the redirect so that if there is no order in the url it will refresh with one in there, i know its not that good because you cant do location or group yet, but it worked for me.

Code: Select all

if request.QueryString("order") = empty then
Response.Redirect "default.asp?order=userlastname" 
if orderby <> "userlastname" and orderby <>"recordstatus" and orderby <> "recordaddon" then
response.Redirect("error.asp?eno=9")

i added the order=userlastname to prevent it kicking me out of groups and locations

Code: Select all

<%
			  if request.QueryString("groupid") <> empty then
				  	if request.QueryString("locationid") <> empty then
					orderbyname = "default.asp?order=userlastname&locationid="&request.QueryString("locationid")

&"&groupid="&request.QueryString("groupid")
					else
					orderbyname = "default.asp?order=userlastname&groupid="&request.QueryString("groupid")
					end if
				  else
				  	if request.QueryString("locationid") <> empty then
					orderbyname = "default.asp?order=userlastname&locationid="&request.QueryString("locationid")
					else
					orderbyname = "default.asp?order=userlastname"
					end if
				 end if
				  %>
thanks for the help, and a great product![/code]
Thans for the great product!

User avatar
davidyin
Members
Members
Posts: 181
Joined: Wed Apr 27, 2005 10:50 pm
Location: Burnaby

Post by davidyin »

Thanks for your sharing.

keshymarkyz
Newbie
Newbie
Posts: 1
Joined: Tue May 15, 2018 1:43 am
Contact:

Re: Default Sort Order Lastname?

Post by keshymarkyz »

How to turn that sort of last name and making those standing position

Post Reply