Nested lists

  

Is it possible to create a list of list in Outsystems?

Hi,


It's possible, but it makes confusion and its not recommened.


_Navaneethan

Yes it is possible. Don't see any problem when used correctly.

Hi Vyacheslav,

It depends on what you mean with "a list of lists". A List by itself must be of a certain type, e.g. a List of Text, or a List of MyStructure. There's no way to create a List of List directly. However, if you have a Structure that contains a List of something, you can create a List of that structure. Also, you can create a List of Record, with the Record containing a List of something (a Record being a kind of implicit Structure).

@Navaneethan: why do you say it's "not recommended"? Lists containint Lists (in the way I described) are a very common thing with e.g. REST services, mirroring the JSON.

Guys, could you explain how to do this?

@Vyacheslav: it seemed you posted just while I answered, so see my post above.

Kilian Hekhuis wrote:

Hi Vyacheslav,

It depends on what you mean with "a list of lists". A List by itself must be of a certain type, e.g. a List of Text, or a List of MyStructure. There's no way to create a List of List directly. However, if you have a Structure that contains a List of something, you can create a List of that structure. Also, you can create a List of Record, with the Record containing a List of something (a Record being a kind of implicit Structure).

@Navaneethan: why do you say it's "not recommended"? Lists containint Lists (in the way I described) are a very common thing with e.g. REST services, mirroring the JSON.


Hi Kilian,


I thought he mentioned about list widget.


_Navaneethan

Navaneethan M wrote:

I thought he mentioned about list widget.

Well, in that case the basic answer would be "no, you can't, unless you put the second list in a Web Block". Still not "unrecommended" though, it depends on what you're doing (there are some very valid use cases).