Well for a start looks like you've got one too many closing brackets. What are you trying to do if the key does not exist in a struct? Output a string or have the contents of the string evaluated?
Kola >> -----Original Message----- >> From: Aidan Whitehall [mailto:[EMAIL PROTECTED]] >> Sent: 21 February 2003 09:17 >> To: [EMAIL PROTECTED] >> Subject: [ cf-dev ] Iif() and StructKeyExists() >> >> Hey, Stephen, you da man with Iif() - any idea how to do this one? And >> if it's too tricky, I might just use cfif, like you suggested last time >> round. Thanks! >> ============ >> >> I've got an array of structures and am looping through them and writing >> several queries on the fly. However, I can't hit on just the right >> combination of quotation marks to stop it throwing an error. >> >> Does anyone know how to write it correctly, outputting either null or >> the value surrounded by apostrophes? >> >> #Iif(not StructKeyExists(values[i], "proximity"), DE("null"), "'" & >> "values[i]["proximity"]" & "'"))# >> >> >> -- >> Aidan Whitehall <[EMAIL PROTECTED]> >> Macromedia ColdFusion Developer >> Fairbanks Environmental Ltd +44 (0)1695 51775 >> >> ________________________________________________________________________ >> This e-mail has been scanned for all viruses by Star Internet. The >> service is powered by MessageLabs. For more information on a proactive >> anti-virus service working around the clock, around the globe, visit: >> http://www.star.net.uk >> ________________________________________________________________________ >> >> -- >> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
