456
Views
7
Comments
Solved
Difference between List, Record, Structured List and Structured Record List.

I am new to Outsystems and am having difficulty understanding what List, Structure, Record List and structure List are, Coming from a JS developer POV. 

Please elaborate what these are, as this post will help budding developers like me, to understand such things in the way we are familiar with, 

For example, I understand that a List is like an Array (in JS), So define it in this way.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi Shivang,

I will try to explain OutSystems concepts using JavaScript terminology to help you relate.

List (like an Array in JS):

OutSystems Definition: A List is a collection of records of the same data type. You can add, remove order, filter elements, and you can access elements by their index.

JS Comparison: Think of a List as an array in JavaScript. It holds a sequence of elements, and you can perform operations like push, pop, and iterate through its items.

Structure (like an Object in JS):

OutSystems Definition: A Structure is a composite data type that groups data elements. It's similar to a class, but it doesn't have behavior, only properties.

JS Comparison: Consider a Structure as an object in JavaScript. It holds properties (like key-value pairs), but unlike a List, it doesn't have an order, and you access properties by name.

Record List (like an Array of Objects in JS):

OutSystems Definition: A Record List is similar to a List but specifically for structures. It's a collection of records of the same structure.

JS Comparison: Think of a Record List as an array of objects in JavaScript. Each object follows a specific structure (like a class or a blueprint), and you can perform array-like operations on this collection.

Structure List (like an Array of Objects in JS with a predefined structure):

OutSystems Definition: A Structure List is a collection of structures of the same type.

JS Comparison: Similar to a Record List, consider a Structure List as an array of objects in JavaScript, but with a predefined structure. Each object (structure) follows the same blueprint.

In summary, OutSystems Lists are like arrays, Structures are like objects, Record Lists are like arrays of objects with a predefined structure, and Structure Lists are collections of objects with a predefined structure. 

Hope this makes sense for anybody with JavaScript experience.

Regards,

Daniel

UserImage.jpg
Shivang Shukla

Thank you for the answer, it will clear major doubts for anyone switching from coding based development to outsystems, Few question more, How record List is different structured list if they both are array of objects, i get it that, in a structured list, we store all same structured of objects into an array. Also whats the usage of object data type in outystems?

2021-09-06 15-09-53
Dorine Boudry
 
MVP

@APK Tank ,

what do you mean when you say "a Record List allows records with different structures". 

That doesn't sound right !

2020-09-21 11-35-56
Sachin Waghmare

Hello @Shivang Shukla,

These are basically data types which you can use based on your use case. Please refer this documentation link to learn more about this.

https://success.outsystems.com/documentation/11/reference/outsystems_language/data/data_types/available_data_types/?

Thanks,

Sachin

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi Shivang,

I will try to explain OutSystems concepts using JavaScript terminology to help you relate.

List (like an Array in JS):

OutSystems Definition: A List is a collection of records of the same data type. You can add, remove order, filter elements, and you can access elements by their index.

JS Comparison: Think of a List as an array in JavaScript. It holds a sequence of elements, and you can perform operations like push, pop, and iterate through its items.

Structure (like an Object in JS):

OutSystems Definition: A Structure is a composite data type that groups data elements. It's similar to a class, but it doesn't have behavior, only properties.

JS Comparison: Consider a Structure as an object in JavaScript. It holds properties (like key-value pairs), but unlike a List, it doesn't have an order, and you access properties by name.

Record List (like an Array of Objects in JS):

OutSystems Definition: A Record List is similar to a List but specifically for structures. It's a collection of records of the same structure.

JS Comparison: Think of a Record List as an array of objects in JavaScript. Each object follows a specific structure (like a class or a blueprint), and you can perform array-like operations on this collection.

Structure List (like an Array of Objects in JS with a predefined structure):

OutSystems Definition: A Structure List is a collection of structures of the same type.

JS Comparison: Similar to a Record List, consider a Structure List as an array of objects in JavaScript, but with a predefined structure. Each object (structure) follows the same blueprint.

In summary, OutSystems Lists are like arrays, Structures are like objects, Record Lists are like arrays of objects with a predefined structure, and Structure Lists are collections of objects with a predefined structure. 

Hope this makes sense for anybody with JavaScript experience.

Regards,

Daniel

UserImage.jpg
Shivang Shukla

Thank you for the answer, it will clear major doubts for anyone switching from coding based development to outsystems, Few question more, How record List is different structured list if they both are array of objects, i get it that, in a structured list, we store all same structured of objects into an array. Also whats the usage of object data type in outystems?

2021-09-06 15-09-53
Dorine Boudry
 
MVP

@APK Tank ,

what do you mean when you say "a Record List allows records with different structures". 

That doesn't sound right !

2023-04-17 05-19-55
Vaishali Shrivastava

Hi @Shivang Shukla,


These are data types.


Record - A Record is a data type that's composed of a fixed number of attributes, each one with its own data type. Use a Record to define a compound data type that is used for a single variable.  

For example you need to return the result of an Aggregate on a User Action. In this case, you can define the user action output parameter using the record data type.


Structure - A Structure is a custom data type. A variable holding a collection of variables with different data types grouped together.

https://success.outsystems.com/documentation/11/developing_an_application/use_data/use_structures_and_records_to_create_compound_data_types/

If you need to define more than one variable with the same compound data type, use a Structure instead of using a record.


Now suppose you have an aggregate that returns user details. If it returns only a single user detail, you can use record here to hold the data returned from the aggregate, but if it returns details of multiple users, you need a list of user records here to hold this data.

2025-06-01 02-51-51
YASH PAL

Hi just giving my thoughts if helps in some way - 

List - List is something like arrays in JavaScript. let's say you want the same type of data multiple times. so instead of declaring variables for each value, you can use a list of that data type (list of text, integer, or anything else) for storing the data. just like the array index in OutSystems the list also has an index. 

Record - so like when you have a case you want to use different types of data. so instead of declaring each variable separate. you can use a variable that has record type and in which you can add your any type of data by just creating a new attribute in that record type of variable. this will save the number of variables to declare on the screen. i hope this will help you.

Structure - So structure is similar to the record but let say you want to declare a data type of your own (you made a record of text, integer and boolean). but you want to declare for the whole module or application. so you can use it anywhere and you don't need to redeclare each and every time you want same type of data. then you can declare a structure and where ever you want to use that data type you can take the dependencies and can use there.

List of structure(record) - List of structure or record is same. just the use case is that let say you want a data multiples time but that has your own types of data. so declare a structure and on the screen you declare a variable and select the type of that variable of list of the structure.

Note - inside a record you can have another record and list.

Examples

List - I want to get the ever user's name - so delcared a list of text on the screen.

Record - I want to present a user's values like name, email, address, pincode, - so i made a variable of record type and this record i will have 4 attributes, text type for name, email type for email, text type for address, and long integer type for pincode.

Structure - so let's say you want to use name, email, address, pincode of that user on multiple screens. so you declare a structure of type text,email,text,long integer, just like the record that declared on screen. but structure we declared for the application. so you can use that structure where ever you want.

List of Structure - So let's say you want all four values of user for every user on the screen. so you declare the list of structure that you have created and assigned the values to that list. 

That's it. (hope you will understand)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.