Need help with certain items on codeless

Hi Vladimir,
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[0].itemname”, it shows the first element of the array. But my goal is to list all items that have relationship to a particular user…

Please advise.
PS. I can speak english or russian, whatever you prefer.

Hi @Alexey_Shmonov

Seems like you are looking for a way to render a repeater inside another repeater, is that correct?

Yes I think so!

Thanks for the clue, the following worked for me. Is it the best way though?

1 Like

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?

  1. you have two repeaters
  • Container1 - root repeater
  • Container2 - it’s inside the root repeater
  1. you assign a list to the Container1 root repeater
  2. under the Container1 each component has an access to its item from the list (Repeater Item Data Model)
  3. for the Container2 repeater you specify in the Repeater Data Logic handler data-binding to the useritem list
1 Like

for the container2 - should repeater data logic refer to just db column name or as a property, like

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.

Hi, @Alexey_Shmonov

It’s completely different from what we talked about at the beginning. But still this one sounds good, which you did with App Views.