821
Views
4
Comments
Select row from a table
Application Type
Traditional Web, Service

In a table there are multiple columns for some kind of 'Id's(for eg:employee Id,department id etc).If I select a particular row from a table Employee Id should be stored in another table(This is not the Id of that row. There is a particular column named employee Id and value in that cloumn should be stored when I clicked on the select button). There is another button named 'Save'. Those data selected from the table should  be display on another table only when we click on the save button. How can I do that?


Screenshot (208).png
2020-11-13 07-48-15
Khuong Truong

Hi Femi,

1. You can use a local variable to store selected row. It can be List Record type.

2. Whenever user click Select, use ListAppend action to append the Current row into your local List.

3. When Save, just need to Save the local list and if you want to display it in another table, you can use the local list as Source.

Hope this helps,

Khuong

UserImage.jpg
FEMI EMMANUEL

I can't see these list things in my outsystems. I created a local variable. Then in select button action I assigned the variable to a column name-EmployeeName (I want to store the value of the column Employeename to that local variable). Then in the save button action I've to do something to display this EmployeeName in a column in other table(Resource column in SelectedResourceTable as shown in figure). What should I do?

2020-11-13 07-48-15
Khuong Truong

Hi Femi,

If you don't see ListAppend action, you need to add dependencies, then select ListAppend action as you needed.

Cheers,

Khuong

2022-08-10 06-17-04
Mita

Hi FEMI,

If I am not wrong, you want to add a particular data item of that row on the select of the SELECT button and On Click of SAVE button you should be able to see the previously selected data items in another table.

As Khoung said, you can make a local variable of type list of that particular aggregate which have you used to make the SELECT RESOURCE table. and on click of the SELECT button you can have the client action to append the list with that data item.

and on click of SAVE button you just have another table under the SELECT RESOURCE table to show the values of List Local variable .

you can one more local variable of type "Boolean" and sets it default value "False". Use this Boolean variable to display  the  another table. Enclose another table in to an IF Widget and set the condition "Boolean variable = True. 

on click of SAVE button just assign that Boolean variable "True" value, so that it will display another table. 

If you need more help, Please let me know.

Hope it helps.

Thanks,

Mita

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