Skip to main content

I am trying to display an object using a deck, then have the attachments of the records of those object being displayed in another deck nested in the first deck.

I manage to set the attachment model’s parent id to match the first object model’s id. However when displaying, it only matches to the first row of the first object model.

What’s the best way of displaying a nested deck within another deck and how would you relate the models together to display correctly?

I don’t think this is possible in the mobile page builder. You need to set the Context of the component which is not available in the mobile page builder.



Jsun,

Not sure if this is worth the effort, but you could potentially create a type of ‘drawer’ for the attachments.

You’ll want to make sure you set you Attachments Model to not pull any data on page load. Make the condition you set up to link to the parent id filterable.
Add two buttons in the first division of your deck on the records deck. One to open your ‘drawer,’ and one to close it. (you can render these based on whether there is data in the attachments model, if you only want you users to see one at a time).

When the user clicks Open button, (1) Set the value of the condition on your attachments model to {{Id}}, and (2) Query the Attachments Model.

When the user clicks the Close button, Empty the attachments model.

I think that should work?




Thanks guys, I actually did another approach - I tried to replicate this http://help.skuidify.com/m/models-conditions-filters/l/102520-include-child-relationships and hacked the xml in the mobile page to work in a similar way, and it worked.


Nice! Glad you got it working.