Database view - How to correctly join a table using a document_id fieldIssue When creating a database view it is sometimes necessary to join tables via a Document ID type field. Like Reference fields, Document ID fields allow the record to reference another record. However, Document ID fields allow you to reference a record on any table, not just a pre-defined one like Reference fields. This means that the data is stored in 2 fields: Table Name & Document (sys_id) Incorrectly joining tables by only referencing the Document field can lead to unexpected outcomes like only returning partial results or, a mismatch between the row count and the results returned. ResolutionIn order to correctly join 2 tables via a Document ID field, we must reference both fields in the where condition, hardcoding the referenced table name. For example: If I want to join the [Assessment Instance table] to the [Incident] table I need to take note of the following 3 fields: Assessment Instance [asmt_assessment_instance] trigger_idAssessment Instance [asmt_assessment_instance] trigger_tableIncident [incident] sys_id The where condition should be: inc_sys_id = aai_trigger_id && aai_trigger_table = 'incident'