Display Child Records (Attachments) of Lookup within Table

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I'm trying to traverse a lookup field to display that lookup's Attachments in a table.  Is this possible?  Here's a bit more detail: 

I have object ConsultationMedRec with lookup to object MedRec.  I have a ConsultationMedRec table.  I would like to display MedRec Attachments within the ConsultationMedRec table.  

It looks like I can't "trick" the XML to query the child of a lookup, so I'm wondering if this is possible using a custom renderer. 

Thanks for the help!
Photo of Elissa Bradley

Elissa Bradley

  • 1,672 Points 1k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
I don't think you are going to be able to retrieve "Children of the parent" fields within a single model. I'm not a DBA but I'm thinking this is a limitation in SOQL,  rather than just somthing that Skuid can't do. 

But what you can do is create a drawer under your ConsultatinMedRec rows.  In that drawer you can include components bound to other models.  The "before load actions" can be used to limit the attachments model to the ones associated with the parent of the MedRec rows.  (see our drawer tutorials for more information). 

Not exactly what you asked for,  but perhaps satisfactory...