Grant
June 8, 2023, 11:24pm
2
Hi Dave,
At the moment, there is not a way to unhide additional fields in the query builder when broken into individual ranks in a tree. The only two options are Author and Full Name as you mentioned.
opened 04:18PM - 28 Mar 24 UTC
1 - Request
2 - Queries
**Is your feature request related to a problem? Please describe.**
Currently in… Specify 6 and 7 there is no ability in the query builder to search on any arbitrary field in the tree table once you select a specific rank.
### Current Behavior
#### At (any rank)
See that all fields and relationships are exposed in the list of fields to choose from
<img width="879" alt="image" src="https://github.com/specify/specify7/assets/37256050/df1a688b-aa6c-47ad-b3bb-4ca94c12f969">
The `stringid`s are constructed as you'd expect:
```
1,9-determinations,4-preferredTaxon.taxon.fullName
```
#### At {Rank} level
Only `author` and `fullName` can be chosen from the list of fields once you select a level in the tree.
<img width="827" alt="image" src="https://github.com/specify/specify7/assets/37256050/ad7e94bb-1c18-4126-a92b-063b53a00402">
The `stringid`s associated with these rank-specific query items are unusual. They are formatted as follows:
```
1,9-determinations,4-preferredTaxon.taxon.Kingdom
1,9-determinations,4-preferredTaxon.taxon.Kingdom Author
```
It looks like there is special logic handling these `treeNodeCols` when constructing a string ID for these items.
**Describe the solution you'd like**
Currently, users can only choose two fields at any given tree rank:
* Author
* Full Name
Users should be able to select any rank in a tree (e.g. Family, Genus, Species, etc.) and select any field in the tree table at that level.
Instead of seeing only these two fields:
<img width="364" alt="image" src="https://github.com/specify/specify7/assets/37256050/5bcd25ad-1f96-4737-978f-bc466aa4fb76">
You should see this:
<img width="362" alt="image" src="https://github.com/specify/specify7/assets/37256050/da77ad8e-4758-4d1b-889d-4f6890b962a6">
The list of fields should be comprehensive, including `Author`, `Common Name`, `Full Name`, `GUID`, `Is Preferred`, `Name`, `Protected Status`, `Remarks`, `Source`.
**Reported By**
Louisiana State University Museum of Natural Science, University of Florida, CSIRO, University of Kansas, many others
There is a workaround so that you only return taxa records where the Taxonomic Rank is equal to the rank in your tree. For instance, the query below only returns records from the taxon table where the rank is equal to Family.
You may need to check “Reveal Hidden Form Fields” in the bottom left of the query builder so that you can reveal the Taxonomic Rank link from Taxon (any rank).
This will allow you to return the Group Number field and restrict your query to only families!