Javascript: Iterate child relationship items?

Is it possible to iterate child relationship items using javascript for a row in a model that has child relationships?

Looking in skuid.$M(‘ModelName’).data[rowNum] it doesn’t appear that there’s any reference there to an array of child relationship objects, and I’m not finding anything in the SKUID documentation about this as well. I’d imagine that being able to access the array of child relationship items in javascript is a beneficial ability and should exist in some form.

Any assistance is appreicated. Thanks!

Ah I see it now. It looks like the fields only appear if there actually are child relationship records in them.

To access you would use for example:

//This is an array
let childRelationshipItemsArray = skuid.$M(‘ModelName’).data[rowNum].TheChildRelationshipNameDisplayedOnTheModelFields.records
1 Like

You beat me to it but I was about to past this. It is how you can reference the child records in UI only formula fields, or text and image components. ContentDocumentLinks in this case is the child relationship field on the model