I went through all the mission steps, however I still can’t wrap my head around some items.
Would it be possible for you to help me from time to time with my questions?
My current struggle:
I have two tables - users and items. Relation is from user to items, one to many (meaning - one user can have many items).
I’m able to retrieve this from the database, but because of the relationship type 1:M I have the results in the form (I used print to console):
So, when I’m trying to put this into repeater data for container, it can’t retrieve this data, because it’s an array.
However if I put data binding as “useritem.itemname”, it shows the first element of the array. But my goal is to list all items that have relationship to a particular user…
PS. I can speak english or russian, whatever you prefer.
Seems like you are looking for a way to render a repeater inside another repeater, is that correct?
Thanks for the clue, the following worked for me. Is it the best way though?
yes, it’s one of the approaches,
as an alternative, you can try using data-binding for the
Repeater Data Logic handler
can you please share some example with the Repeater Data Logic handler?
for the container2 - should repeater data logic refer to just db column name or as a property, like useritem.name?
the RepeaterDataLogic expects a list, so you should return in the logic a reference to a list, so the data-binding must bind to a list in the parent data model
take a look at these docs, it should help understand the concept with DataModels/Repeaters
I think I found a better solution, I’d like to hear your feedback -
I created a table view where I put the columns I need and it simplified everything, additionally I’m now able to sort the list of items.
It’s completely different from what we talked about at the beginning. But still this one sounds good, which you did with App Views.