Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error recalling the same page?

Status
Not open for further replies.

Gill1978

Programmer
Joined
Jun 12, 2001
Messages
277
Location
GB
Hi!

I'm got a query returning a recordset which is outputted to the screen in a coldfusion table. I'm trying to set the headings as links so that the query is run again when the heading link is pressed and the sort order is sorted by that clicked heading. However i'm getting the folowing error below.

I'm passing url.variable, i need this so that the right query is run for the result set. How do i get around it?

Error Diagnostic Information

An error occurred while evaluating the expression:


relationships = url.user_id



Error near line 5, column 7.
--------------------------------------------------------------------------------

Error resolving parameter URL.USER_ID


The specified URL parameter cannot be found. This problem is very likely due to the fact that you have misspelled the parameter name.



The error occurred while processing an element with a general identifier of (CFSET), occupying document position (5:1) to (5:35).


Date/Time: 06/07/02 17:07:44
Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Remote Address: 192.168.111.139
HTTP Referer: Query String: user_relation=1,2,3

Thanks

Julie
 
You can see from the "Query String" part of the error message that the URL parameter is not being passed to the page. The only URL parameter being passed in this case is "user_relation", with value "1,2,3".

Without seeing your code, I can't really tell you why user_id is not being passed, but check your links and make sure they are passing the URL parameter "user_id". If you can't find it, I suggest posting your code.
 
The a href is:

<cfoutput><a href=&quot;projectBrowserScreen.cfm?user_relation=#url.user_id#&quot;>Status</a></b></th></cfoutput>

and the part that is erroring is:
<cfset relationships = url.user_id>

relationships is used in the query below it!

 
It looks like you should change the HREF of your <a> tag to &quot;projectBrowserScreen.cfm?user_id=#URL.user_id#&quot;.

The variable name of a URL variable is the part that's before the = sign on the URL. In your sample, you are passing the URL variable &quot;user_relation&quot; but trying to retrieve the URL variable &quot;user_id&quot;, which is why you're getting the error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top