9
Views
2
Comments
Comment list recursive how to in Reactive
Question

Hi guru's!

I have a simple data model to store a comment, also a reply on a comment can be created.

I want to show this in the screen like this:


So the challenge is how to do this because Outsystems does not support recursive lists.

I was thinking to make the list like:


Comment List:

- Key
- ParentKey
- Comment

Then in the screen list maybe to something like check if ParentKey = previous key

If so then increase level.

mvp_badge
MVP
Rank: #2

You could also store the level in the database (which is parentlevel + 1)

Rank: #469

Hi Kilian,

Thanks for taking the time to think with me.

Yes storing a level in the database is an option.

And what is then the best solution to fetch the records from the table.

That this is not happening:

1.

1.1

2.

3.

2.2