How can I avoid this infinite loop?

I’m building a family organising/calendaring app. involving multiple households. There are several many-to-many relationships in the database which seems to create infinite loops.

One example
An Event can be attended by multiple Children but also -
Multiple Children can attend multiple Events.
In the screenshot below I’d like to list the Event Name in the Title then list the Children attending the Event in the subtitle.
That seems to create an infinite loop.
How can I avoid the loop in my screenshot?

1 Like

I am also into similar issue when connecting collections together. I am interested in where this conversation goes.

to me its not a bug due to ones App, its just part of the “not so clear to use” features of Adalo :laughing:

  • probably saves your day in some very specific needs…if you dont use it, dont matter…

In most cases, You need to play with nested custom list to avoid these.

I bet that you want something like a Title that shows current event > name. And you also want a subtitle that shows current event > children > name.

The logic is you need a custom list of Event as a parent list. Then you need to convert the Subtitle component into a custom list.

Despite this is only 1 component, but you can change it into custom list. Set this list to become a Children list, filter it into Current Event > Children.

Voila! You’ll now can tap into Current children > name in the magic text of that subtitle component. No more infinite loop.

You can also make a custom list from a group of several components in case you need to add more component (not only 1 subtitle text).

As a tip, Always use a custom list whenever you want to build a list. Even the simplest one. Because, maybe it’s not today, but one day you’ll need add more logic to your list then you don’t need to rebuild your list.

1 Like

Thankyou.

Correct!
Can there be multiple children displayed?

I’m glad to hear its possible, but I’m not sure exactly what you mean by having a list of Events, then the Subtitle within that list being a Custom List…? As in, a list within a list?

ok, so I’ve figured out what you referring to regarding list within a list.
Deleted the original subtitle, replaced with text field and converted to nested custom list.
For anyone else, here’s the link.
(I was getting excited at this point) but then…

See screenshot - Same issue.

After you’ve successfully created a Children list with a filter Current Event > Children, then you can just select the magic text to Current Children > name. No need to choose Current event > children > name.

Because at this moment the Current Children is been already Current Event > Children.

From your screenshot I can see those Current Children is exist. So I think so far you’ve successfully did it (the list within list)

Mate thankyou so much for your patience. I even added the Childs profile pic and Event date.

1 Like