Using a field from a different view

Hello All,

I have a view called patient, and a view called risk. Risk has a foreign key patientId to patient, and the link is created in the explore object.


I want to display the patient name in one of drilled fields in Risk, but i am getting an error that the patient isn’t accessible in Risk.​​​

0 3 137
3 REPLIES 3

Have you fully scoped it? ie. patient.name not just name

439fbf1f-3520-4292-a472-737c19dea38b.png
4f6e7942-3af1-4a92-b427-22ec0b7bf0cd.png



Thanks Dawid for replying. I am actually scoping it with the view name, but it is still giving me the error.
Check the images above

But you only have a tooth_risk join in the Patient explore. It doesn’t make it both ways. You have to add the same JOIN in the other direction, i.e., the patient has to be available in tooth_risk explore

explore: tooth-risk {
join: patient {
type: left_outer
relationship: many_to_one
sql_on: ${patient.patient__id} = ${tooth_risk.patient_id} ;;
}
}
Top Labels in this Space
Top Solution Authors