Page 1 of 1
Default Sort Order Lastname?
Posted: Tue Oct 23, 2007 8:05 am
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.
Posted: Tue Oct 23, 2007 1:36 pm
by davidyin
Posted: Wed Oct 24, 2007 11:39 am
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.
woohoo, got it working
Posted: Tue Oct 30, 2007 11:24 am
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]
Posted: Thu Nov 01, 2007 11:22 am
by davidyin
Thanks for your sharing.
Re: Default Sort Order Lastname?
Posted: Tue May 15, 2018 1:44 am
by keshymarkyz
How to turn that sort of last name and making those standing position