Hello,
I just wanted to know more about list and record. So my question is where exactly do we use list and record? What is the difference between list and record?
Hi Atharva,
A List and a Record are two different data types that don't have a lot in common but go hand-in-hand when developing.
Quoting the docs, a List is a sequence of elements of the same data type.On the other hand, a Record is similar to a Structure. It is a type of data that can store several variables inside of it, following a template that you build. The difference however between a Record and a Structure, is that a Structure can be built and then reused across several parts of your application, while a Record is created and used in one place only. You can read more about it here.I hope I answered your question.
Hi Alexandre,
Can you please provide any particular scenario?
Thanks.
Imagine this scenario: You want to show information about all users in your application. - You will use a List, because you have several users to show - several of the same type.- Each user will be a Record in that list. A user has several bits of info, of different types (like the name, age, location, etc).
A list Data Type is usually created when you fetch data, using an aggregate or a data action.A record is a data type that groups information in a single place. The name, age and location of a user should all be grouped in a single, complex, variable - a Record, or a Structure.When developing, you dont usually need to create variables of these types. You fetch data and outsystems will give you a List - which you can show on a screen in a List widget. That list holds several Records.
Hi,
List used for the list of some datatype it can be entity, structure or basic data type as well. Record is for single record.
regards