It's always safest to check each level of the variable...
<cfif StructKeyExists(Request, 'EventId')
AND StructKeyExists(Session,'eventID#Request.EventId#')
AND StructKeyExists(Session['eventID#Request.EventId#'], 'registration')
AND StructKeyExists(Session['eventID#Request.EventId#'].registration,
'groupBookingID')
>
> I'm doing something wrong which I'm sure it obvious to most.
>
> I would like to see if a session variable has been defined.
>
> I'm using:
> <cfset request.theEvenID = 70 >
....
>
> <cfif isDefined(SESSION['eventID' & REQUEST.theEventID].registration.
> groupBookingID)>
>
> So on this occasion I would be checking for the existance of SESSION.
> eventID70.registration.groupbookinID
>
> I'm getting all sorts of errors with slight variances, can anyone spot
> what I'm doing
wrong?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2
Build sales & marketing dashboard RIAâs for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274186
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4