Hello my objective is each time the user clicks the button the list appends.

but i have problems with the logic where should i put the for each ??



My idea is using the same GuardaObras Id and append the others variables .

Each time the button is clicked  with the same ID append the Data , C,F,A,S ,Horas and Obersvacoes like if it is a list  to later display them as a table

Any ideas ????

Hello


I dont think yo need a for each for that. Like If i press the button how much times do the system have to append the data?


if i press 2 times the action shoudl execute 2 times and append 2 times right?

Carlos Gonçalves wrote:

Hello


I dont think yo need a for each for that. Like If i press the button how much times do the system have to append the data?


if i press 2 times the action shoudl execute 2 times and append 2 times right?


Hey it should append 1 time each . Like the users add data  everytime they want . I want to keep that data to display all in a table to know what did they did in x day in x hours 

So what you need is like a function that create a log each time a person press that button to see who press it?


To do that you only need to save in data base one time everytime a person click on the button so no need for a for each.


If you want in temporary data to show the user what did they add then that a different case and you need a temporary list variable to save the temporary data. In the action instead o save the information to the data base you just append that information to the temporary list variable (no need a foreach for this).