How do you open a patient’s related medications from a button in Adalo?
Pass the current patient into a medication-list screen, then filter the list through Adalo relationships instead of adding manual foreign-key text fields.
Pass the Current Patient into the medication-list screen, then filter that screen’s list where Medication > Patient equals Current Patient. Model the Patient-to-Medication relationship in Adalo instead of adding manual foreign-key text fields, and keep the selected patient in screen context through the detail flow.
Let relationships carry identity through the flow: caregiver to patient, then patient to medications. Each screen should receive the selected record explicitly before its list applies a relationship filter.
The intended outcome
A caregiver can select a patient, tap a button, and see only that patient’s related medications before opening medication details.
Requirements
- Caregivers, Patients, and Medications collections
- A Patient-to-Medication relationship
- A Patient detail screen that has Current Patient available
Step by step
- 01
Model the relationships
Relate each Medication to one Patient, and relate Caregivers to the Patients they may access. Do not add duplicate text fields to imitate foreign keys.
- 02
Open the current patient
From the caregiver’s patient list, link the selected list item to the Patient detail screen so Current Patient becomes available.
- 03
Pass patient context from the button
Add a button on the Patient detail screen and link it to the medications screen while passing Current Patient.
- 04
Filter the medication list
Set the medications list to Medications and filter where Medication > Patient equals Current Patient.
- 05
Open medication details
Link each medication list item to its detail screen while passing Current Medication.
The underlying logic
Adalo screen context carries the selected record between screens, while relationships express which medications belong to that patient.
Manual foreign-key text fields duplicate relationship state and make filters harder to maintain.
Data model
| Collection | Important properties | Relationships |
|---|---|---|
| Patients | Patient details | Many Medications; connected to permitted Caregivers |
| Medications | Medication details | Belongs to one Patient |
| Caregivers | User profile fields | Related to permitted Patients |
What still needs checking?
- This is a forum-native answer with no original Adalocado video. It is automatically organized from the accepted reply and remains open to correction reports.
Common failure modes
Current Patient is unavailable
Check that the previous list item or button links to the screen with the selected Patient record rather than navigating without data.
Every medication appears
Add the Patient relationship filter to the medications list and compare it to Current Patient, not Logged-in User.
Testing checklist
0 of 7 checked on this device
Current limitations
- Current Adalo documentation corroborates record relationships, link actions, and list filtering, but the source thread does not provide a complete current-builder reproduction of this patient workflow.
- Authorization must still restrict which patients a caregiver can access; a list filter alone is not a security boundary.
Current evidence screenshots have not yet been added. Treat the guidance as documented or legacy material according to the status shown above.
What the Adalo community is reporting
These are concise editorial summaries of public forum posts—not endorsements or independently reproduced results.
Accessing a simple list from a button
The solved thread confirms a working sequence from caregiver patients to patient details, patient medications, and medication details using Adalo record context.
Boundary: The accepted post reports the result but does not document every current editor control or authorization rule.
Kami (question) and Kami (accepted answer) · February 2026Sources and status
This page was last reviewed on Aug 14, 2026. Its current status is Documented from current sources.
Verification owner: Automatically organized from an accepted forum answer; monitored for corrections. Next review: Oct 14, 2026.
Changelog
Automatically posted from a solved Adalo forum topic; corrections are monitored on the live site.
Report this answer.
Forum answers post automatically. If a step is wrong, outdated, unclear, or missing an important boundary, send the exact correction and the editor will check the live page.
Report a problemDid this solve your problem?
Never deal with an Adalo problem again.
Rehost becomes the monthly team behind your app. Fixes, releases, integrations, and ongoing changes have an owner.
See monthly managementBring us the messy version.
Describe what you expected, what happened instead, and what you already tried.
Ask Adalocado

