Description
When a custom field has the same name as a table and display = true, it adds an additional filter <custom field> = empty and hence, does not display results.
Steps to Reproduce
- Create a table called u_unit
- Add a field on u_unit called u_unit, label=Unit Number, type=String, max_length=40, display=true
- Navigate to incident and add u_unit as a reference field called Unit Table
- On the incident form, add the newly defined reference to u_unit and add some data in the field in an incident
- Generate a report on incident table, add a stacked_by = Unit, and add the u_unit field on the report
- Save the report and drill into an entry that has data in the u_unit reference field
- The image illustrates the last part of the filter has > Unit = (empty) and returns no records
- Click in the Unit column and press Enter, you will see that filter change to Unit Unit Number = 1234:
- The issue seems to be with having a display field using the same name as the table, and having that as a reference field on any table. Then, reporting on that field using stacked_by to the reference field, the query created for the list view has a problem finding the display field on the referenced table.
Workaround
- Change the field name to be different from the table
- Set the display=true on a different field and not the custom field
- If attempting a bar chart, use a different stack by
- If attempting a pivot, set the custom field as Column instead of Row
Related Problem: PRB689439