How to add multiple records to a local variable? (editable table)

Hello.

I have a quite simple question. How can I store multiple records inside a variable?

I´ve already created a variable that is type record. Maybe an assign would do it, but I want to add, instead of assigning.

I´m using an Editable Table, and what I needed was that whenever the user added a cost (like is shown in the picture bellow), that cost was stored in the local variable.

Sorry if it is too simple...

Could really use some help.

Thanks :)

Hello Camila,

Can you add your .oml please? 

it is easier to set up an example and send it again. 

I believe it is the best way, because there are several ways to do what you need, and seeing the code we can identify the best solution.


Regards.

Solution

Hi Camila,

You can create a variable of the List type in the Data Type editor:

And to assign you can use the action ListAppend:

 

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Data_Types/List

 Best Regards,

Leandro.

Solution

Hello Camila,

do you need a list or something like that?

what do you want to do with the variable?


Regards, Sven

Follow the sample... 

Processing Upload...

Camila Rodrigues wrote:

Okay. It´s here.

Thanks :)


Good,

Look the botton OK2, have the example.



There is a new training about variables, take a look at this.


Best regards,

Leandro.

.oml example updated.

Thanks for all the help. It worked :)

Leandro Correa wrote:

There is a new training about variables, take a look at this.


Best regards,

Leandro.

Thanks, I´ll watch it :)


Camila Rodrigues wrote:

Thanks for all the help. It worked :)

Glad it went right :)