Terribly sorry all! I did eroneously include pound signs in the name.
Lashings complete...
JM
-----Original Message-----
From: Zachary Bedell
To: '[EMAIL PROTECTED]'
Sent: 28/08/00 1:49 PM
Subject: RE: cfparam question
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Pound signs!
> <cfparam name="#client.CustomerCompany#"
> default="#qGetCorpInfo.CorporateName#">,
Too many pound signs! The variable name is assumed to be a string,
so this will probably cause the same problem as the IsDefined thingus
from last week...
Try this instead...
<cfparam name="client.CustomerCompany"
default="#qGetCorpInfo.CorporateName#">
I'm not sure why the original one with no pounds was getting a blank
variable. The var should have at least had the string
"qGetCorpInfo.CorporateName" in it. There could well be other issues
at hand here that I'm not seeing...
<CF_MyOpinion ThatAndADollar="A Cup of Coffee...">
In any case, I think the "more typing" approach is stylistically
better in this case. My understanding of the "right" way to use
CFPARAM is to drop it at the top of your templates to make sure that
any variables that are passed into your page via FORM, COOKIE, URL,
CGI, etc. variables are indeed present. I also believe that they
should generally be initialized with static variables; but that's
just my personal take on style, not any kind of rule.
</CF_MyOpinion>
Best regards,
Zac Bedell
> Hello,
>
> I'm trying to do this:
>
> <cfparam name="client.CustomerCompany"
> default="qGetCorpInfo.CorporateName">, and the variable
> doesn't get set
> a
> value, it is initialized as blank.
>
> qGetCorpInfo is a query and it does return a record. Basically, I
> just want
> to use a shorthand for:
>
> <cfif not IsDefined("client.CustomerCompany")>
> <cfset client.CustomerCompany = qGetCorpInfo.CorporateName>
> </cfif>
>
> which works fine but is more typing :)
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
Comment: Please use PGP!!!
iQA/AwUBOaqmOAraVoMWBwRBEQLVQQCgrTRqWl3RwHnBFXqNUE8vV4Rtsh8AnRt6
oyeDgSMg4X3mHP529FveheL2
=/ud5
-----END PGP SIGNATURE-----
------------------------------------------------------------------------
------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.