Hi,
By default collection object “id” (collectionobject.collectionobjectid) is hidden in the CO query.
Is it possible to unhide the id so the users can add it easily in their queries? This field is not displayed in the schema config.
Thanks,
Alexis
Grant
September 15, 2025, 7:05pm
2
Hi @alexis.beck ,
The ID field in every table is meant to be hidden by default for the user. There are a few exceptions, but most (including collectionobject) have this field as hidden since there is not a corresponding Schema Config record for it.
In most cases, we expect users to query on user-assigned identifiers (e.g. CatalogNumber, AltCatalogNumber) or unique identifiers intended for publishing (GUID).
In your use case, is there a specific reason you regularly use ID in queries? Are you looking for cases where a particular record is absent, or do you search for it directly?
Hi @Grant ,
Thanks for the explanation.
For our mammal collection, tissues coming from other institutions often don’t have a catalog number. They do have sample IDs, but these are not unique by design. For such objects, we prefer to use an internal ID as the identifier. The ID field is very convenient for this purpose, as it is simple to read (whereas a GUID is too complex).
Best,
Alexis
Grant
September 16, 2025, 2:44pm
4
Hi @alexis.beck ,
I’ve opened a new feature request describing the functionality I believe you are looking for:
opened 02:43PM - 16 Sep 25 UTC
2 - Queries
2 - Schema Config
3 - Unverified
Users (e.g., NHM Geneva) require the ability to display the internal `ID` field … (e.g., `collectionobject.CollectionObjectID`) for tables in Specify queries. This field is currently hidden by default and not exposed in schema configuration, limiting its visibility and configurability in queries.
There are several recent tables that have the ID field as visible (e.g. `collectionobjectgroup`), which should be seen as a reference:
<img width="1272" height="262" alt="Image" src="https://github.com/user-attachments/assets/d53c4eec-b723-41b1-895d-9a8b01d40812" />
What we need to do is:
- Make the `ID` field (primary key) for all tables available in Schema Config.
- By default, the `ID` field should remain hidden in the schema, but users should be able to configure its visibility.
- Make sure it is still **not editable** on the forms, WorkBench, Batch Edit, etc. and should be rendered as read-only
## Requirements
1. **Expose ID Field in Schema Config**
- For every table in Specify, add a Schema Config record for the primary key `ID` field (e.g., `CollectionObjectID` in CollectionObject).
- The 'Caption' should be `ID`, the 'Description' should be `Unique identifier for each record in the table. Ensures row-level uniqueness and is used for indexing and referential integrity. Non-editable, automatically assigned by the database.`
- The Schema Config record should allow configuration of the field’s visibility in queries.
2. **Default Hidden State**
- The `ID` field should be set as **hidden by default** for all tables in the schema.
- Existing queries should not display the `ID` field unless users have explicitly configured it to be visible.
3. **Configurable Visibility**
- Users must be able to toggle the default visibility of the `ID` field via Schema Config.
- If set to visible, the `ID` field should appear as a selectable field in the query builder and be included in new queries.
4. **UI/UX**
- Update Schema Config UI to display the `ID` field for all tables.
- Clearly indicate the current visibility state (hidden or visible) and provide a toggle for users to change it.
- If the `ID` field is hidden, it should not appear as an option in the query builder unless the user changes its visibility.
## User Story Example
> For our mammal collection, tissues coming from other institutions often don’t have a catalog number. They do have sample IDs, but these are not unique by design. For such objects, we prefer to use an internal ID as the identifier. The ID field is very convenient for this purpose, as it is simple to read (whereas a GUID is too complex).
## Acceptance Criteria
- [ ] Schema Config record exists for the `ID` field on all tables.
- [ ] Schema Config record uses the name and description defined in this issue.
- [ ] By default, `ID` field is hidden in all tables.
- [ ] Users can set visibility of the `ID` field in Schema Config.
- [ ] Query builder reflects changes to the visibility of the `ID` field.
## Reference
Requested by Alexis Beck at NHM Geneva on the [Speciforum](https://discourse.specifysoftware.org/t/query-unhide-collectionobject-id/2882/3)
Can you let me know if this matches what you want to see?
1 Like
This is related to this post by @sorosoro , and covered in this closed issue .
I think the solution to this issue would solve that one too!
2 Likes
Grant
September 16, 2025, 6:27pm
8
Hi @nfshoobs – thanks so much for looking out!
I will merge these together. This significantly strengthens the request, as there is now interest from several major consortium members.
system
Closed
September 23, 2025, 6:28pm
9
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.