# Problem creating a new Collection Relationship Type

**URL:** <https://speciforum.org/t/problem-creating-a-new-collection-relationship-type/1479>\
**Category:** Get Help\
**Created:** [December 23, 2023, 1:25pm UTC](https://speciforum.org/t/problem-creating-a-new-collection-relationship-type/1479 "2023-12-23T13:25:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sorosoro](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sorosoro](https://speciforum.org/u/sorosoro)\
**Post date:** [December 23, 2023, 1:25pm UTC](https://speciforum.org/t/problem-creating-a-new-collection-relationship-type/1479/1 "2023-12-23T13:25:31Z")

</div>

Hi. I have added a Host Taxon ID relationship in the Collecting Event Attributes table of a collection. It seems to be working well.

Now I want to add another relationship to that collection (i.e. the left side collection), this time an Object relationship in the Collection Object table. But I cannot create a new relationship type.  
In the form to add a Collection Relationship Type I can enter a name, but not the left and right side collections, whatever collection name I enter, it gets deleted. And nothing happens when clicking the magnifier glass.

 ![3](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/a/a47f450d91f38669ea35ad9c0dc1c4bc7ad220b3.jpeg)

I also cloned the Collection Relationship Type that is working well, and I could change the name of the relationship and save it as a new Collection Relationship Type, but I could not change the left and right side collection.

Any ideas what might be wrong?

---

<div class="post-metadata">

**Author:** ![bronwyn](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/bronwyn/32/5742_2.png) [@bronwyn](https://speciforum.org/u/bronwyn)\
**Post date:** [January 5, 2024, 6:39pm UTC](https://speciforum.org/t/problem-creating-a-new-collection-relationship-type/1479/2 "2024-01-05T18:39:40Z")

</div>

Hi @sorosoro,

There is a known bug with the Collection Relationship Type form in Sp7 where it has reverted to the default form of Sp6, making it rather dysfunctional.

There is a GitHub issue that I have updated and passed along to the development team to be addressed with higher priority.

In the meantime, I have just two ways for you to work around this.

1. You can create the new collection relationship type through Specify 6. For this I recommend following the documentation we have [here](https://speciforum.org/t/collection-relationships/182#specify-6-3) on the Forum.

2. If you have access, a new collection relationship type can be created with through SQL at the database level.

For the second option, I was given these instructions to help guide you through that process:

> `INSRT INTO collectionreltype (timestampcreated, version, name, leftsidecollectionid, rightsidecollectionid) VALUES (now(), 0, "NAME", SOURCE_COLLECTION_ID, DESTINATION_COLLECTION_ID);`
> 
> Replacing the following:
> 
> - NAME with the name of the collectionreltype
> 
> - keep the quotes surrounding the value
> 
> - SOURCE\_COLLECTION\_ID with the id of the source/leftside collection
> 
> - DESTINATION\_COLLECTION\_ID with the id of the destination/rightside collection

Please let me know of any further support I can provide at this time.

Thank you for reaching out!

– Bronwyn ツ

---

<div class="post-metadata">

**Author:** ![markp](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/markp/32/1184_2.png) [@markp](https://speciforum.org/u/markp)\
**Post date:** [January 5, 2024, 8:26pm UTC](https://speciforum.org/t/problem-creating-a-new-collection-relationship-type/1479/3 "2024-01-05T20:26:09Z")

</div>

Hi @bronwyn, this clears up an issue that I had submitted in November [New Collection Relationship Form Missing Left and Right Side Query Comboboxes · Issue #4185 · specify/specify7 · GitHub](https://github.com/specify/specify7/issues/4185).

I believe the documentation had previously had the url string `/specify/view/collectionreltype/new/`, when this post makes clear that the url should be `/view/collectionrelationship/new`, which I have tested and is displaying as intended. I notice that they are slightly different, but `reltype` seems to be a valid url but with a buggy form (at least on my end), so may wish to investigate when going into this section of the documentation.

Edit: I see now that the relationship type is a subform of collectionrelationship. It is just the arrow above the name field that makes it look like there should be something there, (fields on either side of the arrow)

---

<div class="post-metadata">

**Author:** ![bronwyn](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/bronwyn/32/5742_2.png) [@bronwyn](https://speciforum.org/u/bronwyn)\
**Post date:** [January 5, 2024, 8:42pm UTC](https://speciforum.org/t/problem-creating-a-new-collection-relationship-type/1479/4 "2024-01-05T20:42:37Z")

</div>

Hi @markp,

Sorry for any confusion I’ve caused!

Unfortunately, the initial workaround I offered on this post was not valid.  
Please see the edits to my response for the updated suggestions in establishing a new collection relationship type in Sp7.

Thank you!

– Bronwyn

---

<div class="post-metadata">

**Author:** ![sorosoro](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sorosoro](https://speciforum.org/u/sorosoro)\
**Post date:** [January 11, 2024, 7:06am UTC](https://speciforum.org/t/problem-creating-a-new-collection-relationship-type/1479/5 "2024-01-11T07:06:18Z")

</div>

Thanks @bronwyn! Glad there is a workaround 🙂 I will try this it out.
