It works for me:
<cfset x = {}> <cfset y = "all"> <cfoutput> #iif(StructKeyExists(x,"#y#head"),DE('yes'),DE('no'))# </cfoutput> <p> <cfset x["allhead"] = 1> <cfoutput> #iif(StructKeyExists(x,"#y#head"),DE('yes'),DE('no'))# </cfoutput> I correctly get no/yes. On Tue, Sep 7, 2010 at 3:37 PM, Michael Grant <mgr...@modus.bz> wrote: > > I know, but I want it inline of an html tag, so that's why I wanted IIF > instead of an if/else block. > > > > On Tue, Sep 7, 2010 at 4:15 PM, Raymond Camden <rcam...@gmail.com> wrote: > >> >> This should work fine: >> >> <cfif structKeyExists(somestruct, "#y#head")> >> >> >> You don't need IIF at all. >> >> >> On Tue, Sep 7, 2010 at 3:04 PM, Michael Grant <mgr...@modus.bz> wrote: >> > >> > If my var "y" = "myCell" and I want to know if the key "myCellHead" >> exists >> > in a struct how do I do it? I thought that the following would work in an >> > IIF statement but it doesn't. >> > >> > iif(StructKeyExists(x.classAssign,"#y#head"),DE('yes'),DE('no')) >> > >> > Any ideas? >> > >> > >> > >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336873 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm