# Unwanted duplicate labels

**URL:** <https://speciforum.org/t/unwanted-duplicate-labels/1282>\
**Category:** Get Help\
**Created:** [August 25, 2023, 1:13pm UTC](https://speciforum.org/t/unwanted-duplicate-labels/1282 "2023-08-25T13:13:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pverley](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/pverley/32/1413_2.png) [@pverley](https://speciforum.org/u/pverley)\
**Post date:** [August 25, 2023, 1:13pm UTC](https://speciforum.org/t/unwanted-duplicate-labels/1282/1 "2023-08-25T13:13:44Z")

</div>

I’m getting some unwanted duplicate labels when I’m generating them from “Query results” tab with queries other than the one the label has been built upon.

Use-case:

Let’s say that have a specimen _NOU051934_ (3 collectors, 2 determinations, 2 preparations one in NOU one in P). We have a query _NOU-label_ on which we created the NOU-label report. I carefully read the Specify-6-Report-and-Label-Manual.pdf, particularly the “Fields that cause duplicates” section to do so.  
Whether I use the NOU-label query from the Query tab or the NOU-label form from the Report tab, behavior is just fine : in this case I get 2 labels when I query by catalog number (one for NOU, one for P), and just 1 label if I add the NOU herbarium criteria for instance.

Then I just “Save as” the _NOU-label_ query as _NOU-label-2_. The query result is exactly the same, but then a click on _View report_ button with _NOU-label_ report will always produce 6 labels (3 for NOU, 3 for P) no matter whether I select only the NOU herbarium preparation or both NOU & P preps. Same behavior with any other query but _NOU-label_ =\> always 6 labels are printed.

Why is it so ?

Thanks for the clarification,  
Philippe V., from NOU & CAY herbarium

---

<div class="post-metadata">

**Author:** ![AndyBentley](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/andybentley/32/534_2.png) [@AndyBentley](https://speciforum.org/u/AndyBentley)\
**Post date:** [August 25, 2023, 9:02pm UTC](https://speciforum.org/t/unwanted-duplicate-labels/1282/2 "2023-08-25T21:02:43Z")

</div>

@pverley you can resolve this by checking the always checkbox for the field that is causing the duplication in the query associated with your report in Specify 6 - usually collector last name or preparations or something like that. Let me know if this doesn’t make sense.

---

<div class="post-metadata">

**Author:** ![pverley](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/pverley/32/1413_2.png) [@pverley](https://speciforum.org/u/pverley)\
**Post date:** [September 20, 2023, 2:01pm UTC](https://speciforum.org/t/unwanted-duplicate-labels/1282/3 "2023-09-20T14:01:07Z")

</div>

Thanks Andy

It does make perfect sense. I have aggregated tables in the query associated to the labels, for preparations, determinations and collectors. But I also have single fields associated to these tables, and as suggested, I checked the “always” checkbox, for instance the “is current” for the determination or the “is primary” for the collectors. Doing so, it remove duplicated labels associated with determinations and collectors. But I still have every preparation when printing my label from a query result selecting a single preparation. I do not manage to find the fields causing that (yet!).

 ![Screenshot from 2023-09-20 15-51-43](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/5/559e0933634ec524a4bd11d9a012db6e0912bbb4.png)

Maybe it has something to do with the Storage table since in our case there are always as many storage entries than preparations for a give collection object ?

---

<div class="post-metadata">

**Author:** ![AndyBentley](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/andybentley/32/534_2.png) [@AndyBentley](https://speciforum.org/u/AndyBentley)\
**Post date:** [September 20, 2023, 2:16pm UTC](https://speciforum.org/t/unwanted-duplicate-labels/1282/4 "2023-09-20T14:16:16Z")

</div>

Yes, it appears that the 1. Herbarium and 3. Collection storage fields are causing that duplication. If you remove those, or uncheck show for those fields it should resolve the issue. There is also a way that you can have the system only print labels for certain preparations by using the prompt checkbox. For instance, if you only wanted to print labels for sheets you could check the prompt checkbox for the preparation type field and then when running the query you will be prompted to select a preparation type in order to print labels.

---

<div class="post-metadata">

**Author:** ![pverley](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/pverley/32/1413_2.png) [@pverley](https://speciforum.org/u/pverley)\
**Post date:** [September 21, 2023, 3:05pm UTC](https://speciforum.org/t/unwanted-duplicate-labels/1282/5 "2023-09-21T15:05:28Z")

</div>

Thanks again for your help.

Indeed, using the Reports prompt form with either the `Prep/Type` of the `1. Herbarium` fields works just fine. This way I can choose exactly for which preparation I print the label.

But it looks like that there is no way to achieve this from the **Query Results panel**. Either I uncheck the `show checkbox` of the aforementioned fields and the label is not printing well since I need these fields in the report; or I keep the fields but then when I click on the **View report** menu button all the preparations are printed.

Not a big deal though since 99% of the time we do want to print all the labels. And now I know that for “cherry-picking” specific labels, I can use the Report prompt form. Solved !

Cheers.
