# Create a Record Set from a Record Set

**URL:** <https://speciforum.org/t/create-a-record-set-from-a-record-set/533>\
**Category:** Configuration & Installation\
**Tags:** Specify-7, Members-only\
**Created:** [July 11, 2022, 4:34pm UTC](https://speciforum.org/t/create-a-record-set-from-a-record-set/533 "2022-07-11T16:34:43Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [July 11, 2022, 4:34pm UTC](https://speciforum.org/t/create-a-record-set-from-a-record-set/533/1 "2022-07-11T16:34:43Z")

</div>

> 📖 This guide will show you how to make a Record Set from a subset of items in a Record Set.

**Step 1:** Find the record set you want to make a subset from.

_In this case, I am going to export the Record Set named **kansas river** _.

 ![Record Set Forms](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/b/bdbaeeb9d123763019215c6157990cd52a7793a3.png)

**Step 2:** Open the Record Sets menu from the navigation bar and click on the :pencil_: icon to the right of the Record Set name.

 ![Record Set dialog with pencil next to record set name circled](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/b/bcdad69d5a6c55c929ed3d8a7d921c0b60972d83.png)

**Step 4:** Click on Query.

 ![Query Button](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/d/d858d045ea2066469f569edfb48b9688e2a6803f.png)

**Step 5:** Select the query that contains all of the fields you wish to export _or_ create a new one by clicking New.

_In this case, this collection has a **Spatial Search** query to use. I am selecting this option_

 ![Query List](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/4/404346da676ddf6566d5fc8d3c0a78f359cc1297.png)

**Step 6:** Run your query by clicking Query.

**Step 7:** Select the items you wish to include in your new record set.

 ![Query results with arrow pointing to Create Record Set](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/f/fc969015995e6039d4b56a9c6fe61e5f0ae04a4f.png)

**Step 8:** Click on Create Record Set. Give it a name and you are good to go!

Now you have a new record set created from the larger record set.

---

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [September 18, 2024, 3:59pm UTC](https://speciforum.org/t/create-a-record-set-from-a-record-set/533/2 "2024-09-18T15:59:09Z")

</div>

This method does not appear to work in our collection’s database running Sp7.9.4  
Following these instructions produces a recordset larger than the original one, whose contents are the records returned for the second query if run on the whole database, not solely the records within the existing recordset.  
Notably, the .csv exported from the subquery is correct. So there is just something wrong with the way the recordset is being produced.

Apologies if this is a known bug. But if not, it should be fixed!

Examples:

 ![Querying within the recordset "Cart Lots that Need Labels" for lots that have catnumbers starting with "74"](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/8/8fb19eda165b36acf1da6310b72b9ad3d955176c.png)

 ![Recordset produced by the subquery (shows that within the query builder, the set of objects is correct)](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/a/a6e7dd2a594ace02d67031db4111a262cba06536.jpeg)

 ![Shows that the recordset produced by the subquery contains more lots than the original recordset](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/b/b0aad3a3299a5d68cc175616d033ecbd22678269.png)

---

<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:** [September 18, 2024, 6:22pm UTC](https://speciforum.org/t/create-a-record-set-from-a-record-set/533/3 "2024-09-18T18:22:12Z")

</div>

> [@nfshoobs](#):
>
> This method does not appear to work in our collection’s database running Sp7.9.4  
> Following these instructions produces a recordset larger than the original one, whose contents are the records returned for the second query if run on the whole database, not solely the records within the existing recordset.  
> Notably, the .csv exported from the subquery is correct. So there is just something wrong with the way the recordset is being produced.
> 
> Apologies if this is a known bug. But if not, it should be fixed!

This is the expected behavior at this time. The above instructions specify that you must explicitly select the items to include in the new record set. You can click on one item in the results, scroll to the bottom of the list, and hold Shift while clicking the last item to select all the items in between.

I agree that the ‘Create Record Set’ logic should rely solely on the results returned in the query! I’ve added a GitHub enhancement request:

> <https://github.com/specify/specify7/issues/5280>
>
> \*\*Describe the bug\*\*
> Creating a record set from another record set without sele…cting any items creates a record set from all results from the unfiltered query.
> 
> \*\*To Reproduce\*\*
> Steps to reproduce the behavior:
> 
> 1. Query on a record set
> 2. \[Try to create a record set from the results of a record set\](https://speciforum.org/t/create-a-record-set-from-a-record-set/533?u=grant) 
> 3. See issue
> 
> \*\*Expected behavior\*\*
> The new record set should be restricted to the results of the query shown to the user.
> 
> \*\*Screenshots\*\*
> 
> \> This method does not appear to work in our collection’s database running Sp7.9.4
> \> Following these instructions produces a recordset larger than the original one, whose contents are the records returned for the second query if run on the whole database, not solely the records within the existing recordset.
> \> Notably, the .csv exported from the subquery is correct. So there is just something wrong with the way the recordset is being produced.
> \> 
> \> Apologies if this is a known bug. But if not, it should be fixed!
> \> !\[image\](https://github.com/user-attachments/assets/a9cc95b8-c798-4ddd-afde-df166f3b67b0)
> \> !\[image\](https://github.com/user-attachments/assets/58eb705d-e542-4b35-8cb7-666d282c97df)
> \> !\[image\](https://github.com/user-attachments/assets/ff75d63d-1607-4ed0-b54d-c2694097155f)
> 
> \*\*Reported By\*\*
> Nate Shoobs at OSU

---

<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:** [September 19, 2024, 4:31pm UTC](https://speciforum.org/t/create-a-record-set-from-a-record-set/533/4 "2024-09-19T16:31:20Z")

</div>

Split this topic on September 19, 2024, 4:31pm UTC

A post was split to a new topic: [Combine Record Sets in Specify 7](https://speciforum.org/t/combine-record-sets-in-specify-7/1972)
