Let's say I have a cfc I'm using to provide a service to multiple
disparate clients. One of the arguments to a function is a struct.
That struct is then used to pass values as individual arguments to a
stored procedure on a database.
Now that struct gets a new field, that field is passed as an optional
argument to the stored procedure and only one of the many disparate
clients is update to add that new field.
How would you design that function to handle the fact that some
clients are NOT passing the new field and there's no need to change
the clients as it's optional?
One idea is pass the value as :-
value = "#iif(StructKeyExists(struct,
'scheduling_flag'),Evaluate(DE('struct.scheduling_flag')),0)#"
Is this the best way or there a better way of handling this?
Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.au
Adobe Platform Users Group, Sydney
Topic: Coldfusion 10 CF Builder and a bit on the Edge
Date: Monday, 26th November at 6pm
Details and RSVP on
http://www.meetup.com/Sydney-Adobe-Platform-User-Group/events/90652722/