 </cfif>
 <!-------------------------------------------------------------------------------------------->
 <!-------------------------------------------------------------------------------------------->
-<cfif len(table_name) gt 0 or len(collection_object_id) gt 0>
+<cfif len(table_name) gt 0>
 
 	<Cfset title = "Encumber these specimens">
 		<cfoutput>



<!-------------------------------------------------------------------------------------------->
<cfif #Action# is "saveEncumbrances">
<cfoutput>
	<cfif len(encumbrance_id) is 0>
		Didn't get an encumbrance_id!!<cfabort>
	</cfif>
	<cfif  len(table_name) is 0 and len(collection_object_id) is 0>
		Didn't get specimens<cfabort>
	</cfif>

	<cfquery name="unencumberedSpecimens" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
		<cfif len(table_name) gt 0>
			select
				collection_object_id
			from
				#table_name#
			where
				collection_object_id not in (
					select
						collection_object_id
					from
						coll_object_encumbrance
					where
						encumbrance_id=#encumbrance_id#
				)
		<cfelse>
			select
				collection_object_id
			from
				cataloged_item
			where
				collection_object_id in ( #collection_object_id# ) and
				collection_object_id not in (
					select collection_object_id from coll_object_encumbrance where encumbrance_id=#encumbrance_id#
				)
		</cfif>
	</cfquery>
	<cfif unencumberedSpecimens.recordcount gt 1000>
		1000 record limit on creating encumbrances
		<cfabort>
	</cfif>
	<cftransaction>
		<cfloop query="unencumberedSpecimens">
			<cfquery name="encSpecs" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
				INSERT INTO coll_object_encumbrance (encumbrance_id, collection_object_id) values (
					#encumbrance_id#,#unencumberedSpecimens.collection_object_id#)
			</cfquery>
		</cfloop>
	</cftransaction>


	<p>
		All items listed below have been encumbered.

	<cfoutput>
		<cfset title = "Search for specimens or encumbrances">
		<p>
			<cfif len(table_name) gt 0>
				Now find an encumbrance to apply to or remove from the specimens below. If you need a new encumbrance, create it
				first then come back here.
			<cfelse>
