498
Views
10
Comments
Solved
How to add multiple records to a local variable? (editable table)
Question

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 :)

2021-08-30 15-28-09
Leandro Correa
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.

2021-06-09 13-39-18
Agno Silveira
 
MVP

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.

2021-08-30 15-28-09
Leandro Correa
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.

2021-05-30 04-10-05
Sven Lambeck

Hello Camila,

do you need a list or something like that?

what do you want to do with the variable?


Regards, Sven

2021-08-30 15-28-09
Leandro Correa

Follow the sample... 

ActivityManagement15.06.2020.oml
2021-08-30 15-28-09
Leandro Correa

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


Best regards,

Leandro.

UserImage.jpg
Camila Rodrigues

Leandro Correa wrote:

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


Best regards,

Leandro.

Thanks, I´ll watch it :)


2021-06-09 13-39-18
Agno Silveira
 
MVP

.oml example updated.

ActivityManagement15.06.2020updated.oml
UserImage.jpg
Camila Rodrigues

Thanks for all the help. It worked :)

2021-06-09 13-39-18
Agno Silveira
 
MVP

Camila Rodrigues wrote:

Thanks for all the help. It worked :)

Glad it went right :)


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