# Setting scope for uniqueness rule in storage tree

**URL:** <https://speciforum.org/t/setting-scope-for-uniqueness-rule-in-storage-tree/1684>\
**Category:** New Feature Requests\
**Created:** [April 9, 2024, 11:03pm UTC](https://speciforum.org/t/setting-scope-for-uniqueness-rule-in-storage-tree/1684 "2024-04-09T23:03:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eyal](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/eyal/32/1186_2.png) [@Eyal](https://speciforum.org/u/Eyal)\
**Post date:** [April 9, 2024, 11:03pm UTC](https://speciforum.org/t/setting-scope-for-uniqueness-rule-in-storage-tree/1684/1 "2024-04-09T23:03:30Z")

</div>

Hi,

I want to set a rule for our storage tree that limits the names of containers in their parent of the parent. So, if we have an Aisle \> Cabinets \> Container, the user won’t be able to create two containers with the same name in an aisle.  
However, since the Storage tree is at the institution level, the uniqueness rules must apply globally, while this rule is only relevant for one division. Hence, I keep getting ‘duplicates exists’ warnings that prevent me from setting this rule.

It would be nice to have the option to set the scope of uniqueness of a rule only for a part of the tree, one branch and not the other (for example, all aisles within a specific room).

Thanks,  
Eyal

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [April 10, 2024, 7:12pm UTC](https://speciforum.org/t/setting-scope-for-uniqueness-rule-in-storage-tree/1684/2 "2024-04-10T19:12:59Z")

</div>

Hi Eyal,

Thank you for your request! I’ve added it to our GitHub issue tracker:

> <https://github.com/specify/specify7/issues/4773>
>
> \> I want to set a rule for our storage tree that limits the names of containers …in their parent of the parent. So, if we have an Aisle \> Cabinets \> Container, the user won’t be able to create two containers with the same name in an aisle.
> \> However, since the Storage tree is at the institution level, the uniqueness rules must apply globally, while this rule is only relevant for one division. Hence, I keep getting ‘duplicates exists’ warnings that prevent me from setting this rule.
> \> 
> \> It would be nice to have the option to set the scope of uniqueness of a rule only for a part of the tree, one branch and not the other (for example, all aisles within a specific room).
> 
> To implement this feature:
> \- Introduce a scoped uniqueness setting for rules in the storage tree.
> \- Allow users to specify a specific branch or part of the tree where uniqueness rules apply.
> \- Users can define unique naming constraints for a particular division or section of the storage tree hierarchy.
> 
> \*\*Requested by:\*\* Eyal at The Hebrew University of Jerusalem
