I have a query that's generated by a form and displayed on the page.
I want to add sorting abilities to the header column. How would I pass the existing form information back to the page along with the new #url.orderby#
variable to have the sorting done off the query results? So if the user has chosen to only display resolved tickets and then order by date submitted.
Currently I have the orderby being passed by URL.
IE.
<th width="15%"><a href="">
This doesnt pass the form information back to the page, causing the default query to run with no editing done aside from the sorting..
-------------
QUERY
-------------
<cfquery name="TicketInfo" datasource="#application.datasource#">
SELECT
g.formid, e.DATE_UPDATED, e.date_submitted,
c.issuetype, e.FORMID as tktid, f.STATUS, f.STATUSID, DECODE(e.ISLOCKED,'0','No','1','Yes') AS ISLOCKED,
count(distinct(e.formid)) over () as rc
FROM
ISSUETYPES c, MAIN e, STATUS f, ISSUES g
WHERE
e.statusid = f.statusid AND
c.issuetypeid = g.issuetypeid AND
e.formid = g.formid
<cfif isdefined("form.issueid") and form.issueid neq '0'>
AND g.formid in (
select formid
from csform.issues
where issuetypeid = <cfqueryparam value="#form.issueid#" cfsqltype="CF_SQL_NUMERIC">
)
</cfif>
<cfif isdefined("form.statusid") and form.statusid neq '0'>
AND e.statusid = <cfqueryparam value="#form.statusid#" cfsqltype="CF_SQL_NUMERIC">
</cfif>
<cfif isdefined("form.fid") and form.fid neq ''>
AND e.formid = <cfqueryparam value="#form.fid#" cfsqltype="CF_SQL_VARCHAR">
</cfif>
ORDER BY #url.orderby# ASC
</cfquery>
Thanks in advance..
Greg Morphis
Rapid Response Team
Client Server Dev/Analyst I
******************************************************************************************
The information contained in this message, including attachments, may contain
privileged or confidential information that is intended to be delivered only to the
person identified above. If you are not the intended recipient, or the person
responsible for delivering this message to the intended recipient, ALLTEL requests
that you immediately notify the sender and asks that you do not read the message or its
attachments, and that you delete them without copying or sending them to anyone else.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

