Designing a Record Detail View

This tutorial will introduce you to the Record Detail View in the context of an Electronic Medical Records (EMR) system. After completing this tutorial, you will learn how to add a new Record Detail View and write formulas to combine several subforms into a single overview.

Before you start

To complete this tutorial, you will need to have permission to create a new database or at least a new form. If you do not have this permission, you can create a free trial account to practice.

Some familiarity with ActivityInfo’s formula language, or Excel and PowerBI-style formulas, will be helpful.

Introduction

This tutorial uses the Electronic Medical Records (EMR) database template as a starting point. We will learn how to create a Record Detail View that summarizes the subforms into a single view that provides all relevant patient details.

Record Detail Views are customizable summaries of a record and their subform that consolidate all relevant information into one clear, interactive view. Components include:

  • Header Component: This displays critical identifiers of a case such as client name, gender, age, and other values at the top of the page.
  • Field List Component: This highlights key fields like contact information and case details.
  • Calculated Tables: This provides running summaries of related subforms,
  • Navigation panel. This allows one-click access to deeper details to the parent record.
  • At the top level, the record list enables quick searching and switching between records, allowing for efficient case review across multiple individuals.

Copying the EMR database template

To begin, create a copy of the EMR database template using this link.

Adding the Record Detail View

  1. To open the Record Detail View, select your database, parent form and click on ‘Views’.
  1. On the ‘Views' panel on the right side of your screen, click on ‘Display table’ then 'Record detail
  1. This will open the ‘Record View’ editor which allows you add components to your view.

Adding a Header Component

To add a ‘Header’ to your Record View, click on ‘Add Components’ then select ‘Heading’ and select ‘Formula editor’. This allows you to use the Concat function to create a dynamic heading that changes accordingly depending on the record selected.

CONCAT("Medical Record: ",  fullName, ", ",  age, " Years")​

Click on ‘Done’ after you have input your formula. This will generate a dynamic header reading ‘Medical Record: Jane Doe, 23 Years’ will change to ‘Medical Record: John Doe, 30 Years’ immediately the user navigates to the medical record belonging to John Doe_._

Adding a Field List Component

To add a ‘Field List’ click on ‘Add Components’ then select ‘Field list’ and this allows you to add field lists by checking on the available fields appearing on the left side of your screen or dragging and dropping the required fields and clicking on ‘Done’.

This will allow you to view the selected fields pertaining to the selected record.

Adding a Calculated Table

To add a Calculated Table, click on ‘Add Components’ and select ‘Calculated table’. The SelectColumns function can be used to select columns from the parent fHi orm or subforms and can also be used to rename the columns. Enter a name for the calculated table and type in a formula to select the required information from the subform. Click on the parent form or subform name in the formula editor to retrieve the formID.

In the screenshot below, ‘ct36euwmev5opgow’ refers to the ‘Triage’ subform formId.

SELECTCOLUMNS(formID, "Date", triageDate, "Event", "Triage", "Description", CONCAT("BP: ",  bloodPressure, " and a Heart Rate of ",  heartRate, " BPM"))

Click on ‘Done' to generate information about the patient’s details and vitals that were recorded in the ‘Patients’ parent form and ‘Triage’ subform for the selected patient.

Adding a Calculated Table From Two or More Table Expressions

The Union function can be used to calculate a new table from each of two or more table expressions. This formula can be used to generate records from multiple subforms such as Triage, Consultation Visits, Lab tests, Prescriptions and Imaging Diagnostics.

UNION(
SELECTCOLUMNS(formId, "Date", triageDate, "Event", "Triage", "Description", CONCAT("BP: ",  bloodPressure, " and a Heart Rate of ",  heartRate, " BPM")),
SELECTCOLUMNS(formId, "Date",  visitDate, "Event", "Consultation", "Description",  visitNotes),
SELECTCOLUMNS(formId, "Date", date, "Event",  "Lab Test", "Description",  CONCAT("The ",  testName, " was ",  testResult)),
SELECTCOLUMNS(formId,  "Date",  datePrescribed, "Event", "Prescription", "Description",  CONCAT(dosage, " of ", drugName, " ",  frequency, " a day for ", duration)))

This formula will generate records from the Triage, Consultation Visits, Lab Tests and Prescriptions subforms in a single calculated table. Enter the formula in the formula editor and click on ‘Done'.

  • You can also add a ‘Navigation’ button to easily navigate to related subforms, referencing forms or directly to subrecords. Click on ‘Add Components' and select ‘Navigation’. This will show you a list of all subforms and you can click on one then click on done to add the navigation button.

The screenshot below shows the Record Detail View full functionality.

The header shows that this medical record detail belongs to a female patient named ‘Jane Doe’ who is asthmatic, and has a Penicillin allergy. The patient visited the medical facility on the 19th of August 2025, during which her vitals taken, she underwent consultation, received a Rapid Influenza Diagnostic Test (RIDT), which returned positive. She was prescribed a medication called ‘Peramirivir’. From the Record Detail View, the clinician can directly navigate to the ‘Consultations Visits’ subform.

In the record list, you can easily switch between records by searching for a record within your parent form. You can also choose how to label records and sort records, for quick selection and navigation. Records can be sorted in either ascending or descending order for any field in the parent form.

Sharing the Record Detail View

A Record Detail view can either be saved as a personal view, shared with other users who have access rights to the database or set as the default view on a form.

To share a Record Detail View, first create a personal view first and ensure that all the information is displayed correctly. Then, click the more options menu (⋮) next to your personal view and select ‘Set to Shared’.

Sharing a Record Detail View is important because it ensures that everyone working on a case has access to the same structured and comprehensive view of a record. All users see the same layout of fields, subforms, and summaries, which promotes collaboration across teams, makes coordination smoother, and reduces the risk of overlooking important information.

Next item
Explanation