JJ
|
| Posted: 04/02/2003, 8:34 PM |
|
Hi there,
Can anyone help me set the default sort order in Taskman to show the list in reverse "Open Date" order (most recent first) and to only show the "Open Tasks"
I'm using ASP
Below is the default that comes with CC.
Thanks
JJ
' Build ORDER statement
iSort = GetParam("FormTasks_Sorting")
iSorted = GetParam("FormTasks_Sorted")
sDirection = ""
if IsEmpty(iSort) then
SetVar "Form_Sorting", ""
else
if iSort = iSorted then
SetVar "Form_Sorting", ""
sDirection = "DESC"
sSortParams = "FormTasks_Sorting=" & iSort & "&FormTasks_Sorted=" & iSort & "&"
else
SetVar "Form_Sorting", iSort
sDirection = " ASC"
sSortParams = "FormTasks_Sorting=" & iSort & "&FormTasks_Sorted=" & "&"
end if
if iSort = 1 then sOrder = " order by t.date_assigned" & sDirection
if iSort = 2 then sOrder = " order by t.requestor_name" & sDirection
if iSort = 3 then sOrder = " order by t.task_name" & sDirection
if iSort = 4 then sOrder = " order by p.project_name" & sDirection
if iSort = 5 then sOrder = " order by t.priority_id" & sDirection
if iSort = 6 then sOrder = " order by e.employee_name" & sDirection
if iSort = 7 then sOrder = " order by s.status" & sDirection
end if
|
|
|
 |
JJ
|
| Posted: 04/03/2003, 9:20 PM |
|
help!
|
|
|
 |
GreggB
|
| Posted: 04/04/2003, 7:38 AM |
|
This if for CC not CCS
If I remember correctly and understand what you want:
1.Open your Page that has the Grid to list you Tasks and in the Forms that is your Grid, click on Form Property Icon.
2.With the Form Properties Open click on SQL.
3.Here you have two choices; one, to use the Where and Order by if what you want to do is simple or, use the SQL String. Based on what you have supplied, I’d say you can use the simple method.
4.At the top you’ll see “WHERE” in here you would add something like “status_id<>3”. This means list everything that is not Closed. Your field Name and the Number may be different.
5.Now in the “Order By” select the “date_assigned” field and then next to it select “Asc or Dsc”. Your field name may be different but I think you get the idea now.
If you need a default sort order on more than one field you will need to use the SQL String and add you own SQL statement.
GreggB
|
|
|
 |
|