I've had a similar thing with url variable:

<cfparam name="url.myvariable" default="The Sky is Blue">
<cfparam name="url.donorid" default="Roses Are Red">
<p>The value of url.myvariable is: <cfoutput>#url.myvariable#</cfoutput></p>
<p>The value of url.donorid is: <cfoutput>#url.donorid#</cfoutput></p>

<cfif url.donorid is ""><p>It's Empty</p></cfif>
<cfabort>

For some reason url.donorid always disappears unless there is an actual
passed variable in the url. However, in theory the cfparam tag should set
the default if none in the url. But no. It comes out an empty string. Here's
the really strange thing because it seems to be just the variable name
"donorid" and if I change the name then no problem. I'm on CF8 and this
little quirk drove me nuts in an application trying to figure out why.



On Tue, Jun 22, 2010 at 5:23 PM, Troy Jones <[email protected]> wrote:

>  I am having a perplexing issue.
>
>
>
> Has anyone ever had an instance where it seemed as if a variable just “
> poofs” into thin air? For example, when I run the following code:
>
>
>
> <cfdump var="#attributes#">
>
> <cfdump var="#pageID#">
>
> <cfdump var="#thisPage#">
>
> <cfset testVar = thisPage.form_id>
>
> <cfoutput>thisPage.form_id = #testVar#</cfoutput>
>
> <cfif attributes.mode is "do">
>
>       <cfset thisForm = application.com.lib.getData("vformfields","form_id= #
> testVar#","field_sortorder")>
>
>
>
> The variable “testVar” exists up until the setting of “thisForm” which
> I’ve verified with the <cfdumps>. At that point, when #testVar# is called,
> it is passing a NULL value to the SQL statement and throwing an error. I’ve
> tried recreating the error with a standard <cfquery> tag just to see if
> something was getting jacked up in the function call, but it had the same
> result. It’s as if the value just ran away and left. I’ve never seen
> anything quite like it and have run out of tails to chase, so to speak.
>
>
>
> This is on CF9 Enterprise, for anyone who needs it and any help would be
> greatly appreciated.
>
>
>
> Troy Jones
>
>
>
>
>
> -------------------------------------------------------------
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by FusionLink <http://www.fusionlink.com>
> -------------------------------------------------------------




-- 
Dusty Hale - President
Hale Technologies, Inc.
Email: [email protected]
Phone (Toll Free USA): 1.877.841.3370
Phone (Atlanta): 1.404.474.3754
Website: www.DustyHale.com

Reply via email to