dont have time to test, but would it not need to something like this???

#Iif(not StructKeyExists(values[i], "proximity"), DE("null"), 
DE("values[i][""proximity""]")))#

You would then need to check the value and decide whether       quotes would work....

Could be wrong... my 2 secs worth

-----Original Message-----
From: Aidan Whitehall [mailto:[EMAIL PROTECTED]]
Sent: 20 February 2003 21:18
To: CF-Talk
Subject: Iif() and StructKeyExist()


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"]" & "'"))#


Thanks!

-- 
Aidan Whitehall <[EMAIL PROTECTED]>
Macromedia ColdFusion Developer
Fairbanks Environmental Ltd  +44 (0)1695 51775



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to