ListAppend with attributes

Service Studio
on 01 Sep 2016
Development Environment

If I want to build a list, the typical way is to have a structure and a list of that structure as local variables, assign the structure attributes, do a ListAppend. so the variable of type structure (or, pre 9, record of that structure) is only used for doing the ListAppend. It would be nice if we had a ListAppend that accepts a list as parameter, then based on the type of that list shows the attributes (or single value in case of a list of basic types). This saves a local variable (and possible clearing of it in a loop). For the developer, this would be a bit like the new platform 9 ListAppendAll, in which it is possible to append a list to another list of different type, specifying conversion. In this case it wouldn't be a conversion, but the actual assignments, though the user interface would look the same.

Created on 29 May 2015
Comments (4)
If I understand correctly, that use case is working already. If you append a structure/entity/record whose attributes don't match the List argument, the Element argument should have an inline conversion expanded below, just like in ListAppendAll.

(In this example, SimpleUser is a Structure with two attributes, Name and Phone)
What I propose is not adding a record like ListAppend, but specifying the value for each of the attributes.
Okay, I think I understand the distinction you are making. Thanks!

Changed the category to Service Studio and the status to

on 01 Sep 2016

Hey Kilian,

Thanks for the idea. Since OutSystems 10 you can expand records inline to assign individual attributes rather than using the full record.