Skip to content

Query Results Show Incorrect Data and Ambiguous Headers for Fields with the Same Name #7436

@bhumikaguptaa

Description

@bhumikaguptaa

Discussed in #7435

Originally posted by bhumikaguptaa September 22, 2025
Description of issue

When a query is constructed to display output fields from different paths that share the same name (e.g., FullName), the query results grid displays incorrect data and uses ambiguous, non-unique column headers. The grid appears to populate all columns with the same name using the data from the first column encountered, rather than the data from their respective paths.

Image Image Image

This causes two major issues:

  • The data presented in the results is factually incorrect.
  • The user cannot distinguish between the columns due to the identical headers.

Example Use Case
A user queries a Collection Object record where:
The determination taxon is Mesocestoides lineatus.
The host taxon is Vulpes vulpes.

Expected Behavior

The results grid should display two distinct columns with unique, descriptive headers and the correct corresponding data. For instance:
Column 1 Header: Determinations: Species - Full name | Data: lineatus
Column 2 Header: Host taxon: Species - Full name | Data: vulpes

Actual Behavior

The results grid displays two columns with identical headers, and both show the data from the first path.
Column 1 Header: Species - Full name | Data: lineatus
Column 2 Header: Species - Full name | Data: lineatus (This is incorrect)

Solution

The system should generate unique column aliases for the results view, perhaps by prepending a parent table or a portion of the field path to the column header. This would resolve both the data mapping error and the user-facing ambiguity.

Reported by

Alexis Beck, Le Muséum d’histoire naturelle de Genève
Link to the Bold desk ticket: https://specifysoftware.bolddesk.com/agent/tickets/197

Metadata

Metadata

Assignees

Labels

1 - BugIncorrect behavior of the product2 - QueriesIssues that are related to the query builder or queries in general

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions