> From: Doug Hyde [mailto:[EMAIL PROTECTED]
> Other than knowing beforehand by having created manually,
> does anyone know
> of a way to check for the existence of a collection. Like no
> point running
> cfindex if the collection doesn't exist, so let's check, and
> if no, let's
> create with cfcollection. I need to create and index collections
> dynamically
I think instead of using a cftry/cfcatch block I would use
cfparam to make sure the struct existed and then use the
structIsEmpty function to determine whether or not to build
the collection or use it...
<cfparam name="yourCollection" default="#StructNew()#" type="struct" />
<cfif structIsEmpty(yourCollection)>
<!--- Build collection --->
</cfif>
This all assumes a collection is a struct, which I do not know as
I do not use the cfcollection/cfindex tags that often.
Mike
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:193185
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54