I had a similar thought one time when I couldn't get the 'evaluate' to work.
I think it's essentially telling coldfusion to replace every double ## with
a single # when it stores it in the database. (self-escaped character), and
to not evaluate it then. When that gets put in from the database, however,
cColdFusion sees just #iif( StructKeyExists(URL, 'cpID'),DE('##URL.cpID##'),
0)# which I guess does the trick?
That is confusing though. Thanks for the example,
Tomek
On Wed, Dec 10, 2008 at 12:47 AM, AJ Mercer <[EMAIL PROTECTED]> wrote:
> dant ask me why
> or how I got here
>
> but this works
> ftDefault="##iif(StructKeyExists(URL, 'cpID'),DE('####URL.cpID####'),
> 0)##" ftDefaultType="evaluate"
>
>
> 2008/12/10 AJ Mercer <[EMAIL PROTECTED]>
>
> Hmmm
>>
>> I have one property with ftDefaultType="evaluate" with a variable
>> and that displays the value of the variable
>>
>> but the property with
>> ftDefault="iif(StructKeyExists(URL, 'cpID'),URL.cpID, 0)"
>> ftDefaultType="evaluate"
>> outputs
>> iif(StructKeyExists(URL, 'cpID'),URL.cpID, 0)
>>
>>
>> 2008/12/10 Blair McKenzie <[EMAIL PROTECTED]>
>>
>>> Yes, but you would need to set ftDefaultType="evaluate" (I think it's
>>> ftDefaultType).
>>> Blair
>>>
>>>
>>> On Wed, Dec 10, 2008 at 4:08 PM, AJ Mercer <[EMAIL PROTECTED]> wrote:
>>>
>>>> is something like this possible?
>>>> ftDefault="iif(StructKeyExists(URL, 'cpID'),URL.cpID, 0)"
>>>> ftDefaultType="expression"
>>>>
>>>> If URL.cpID exists, use that as the default value, otherwise use 0
>>>>
>>>>
>>>> --
>>>> AJ Mercer
>>>> Web Log: http://webonix.net
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> AJ Mercer
>> Web Log: http://webonix.net
>>
>>
>> Once you come to the realisation that everyone is crazy,
>> You will never be surprised or disappointed ever again.
>> AJM 2008
>>
>
>
>
> --
> AJ Mercer
> Web Log: http://webonix.net
>
>
> Once you come to the realisation that everyone is crazy,
> You will never be surprised or disappointed ever again.
> AJM 2008
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---