Never used it myself, but sure I've seen it used somewhere, iif() statement 
within a tag (could be wrong) but thats besides the point anyway.


> Adam is right
> 
> if your going to do that you would have to do this
> 
> <cfset OrganisationNameSearch = evaluate("new
('class.asic.message.OrganisationNameRequestMessage').init
(organisationName = iif(1=1,
> de("'Shelco'"), de(''))))>
> 
> use the IIF to set the value rather than trying to create the whole string
> 
> Steve
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:bounce-cfaussie-
[EMAIL PROTECTED] On Behalf Of Adam Cameron
> Sent: Monday, June 13, 2005 9:35 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] Re: conditional arguments
> 
> >> OrganisationNameSearch = new
> >> ( "class.asic.message.OrganisationNameRequestMessage" ).init( if( 1=1 ) 
> >> {organisationName = 'Shelco'} );
> 
> I don't really think that makes sense.
> 
> >  I know you can use IIF() with arguments in cf tags, but not in methods 
appearently..
> 
> The CFML-version of what you're attempting to do above is kinda like this:
> 
> <cfinvoke 
component="class.asic.message.OrganisationNameRequestMessage"
> method="init" #iif(1=1, dE( "organisationName = 'Shelco'" ), dE("") ))#
> returnvariable="OrganisationNameSearch">
> 
> And obviously you'd not expect that to work, would you?
> 
> You cannot use CF statements to build other CFML statements.
> 
> However, you could (if you REALLY wanted to) do this:
> 
> <cfset OrganisationNameSearch =
> evaluate("new('class.asic.message.OrganisationNameRequestMessage').init(      
> iif(1=1, de(""organisationName = 'Shelco'""), de('')))")>
> 
> But... err... yeah.  I probably wouldn't ever do that ;-)
> 
> -- 
> 
> Adam
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to leave-cfaussie-
[EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to leave-cfaussie-
[EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/



________________________________
Taco Fleur - E-commerce Development Manager
Shelco Searches & Services
An Authorised ASIC Information Broker
www.shelco.com.au
Ph: + 61 7 3236 2605



---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to