72
Views
1
Comments
Data Grid Bulk Update by Column
Question
Service Studio Version
11.54.10 (Build 62419)

Is it possible to either select a column and update all of the rows for the selected column?  For example, if I have Col1, Col2 and Col3 with 10 rows of data.  Can I select Col3 and update the value for Col3 in all 10 rows?

2022-07-11 07-49-33
Alka Asnani

Hi David Wofford


Yes, it is possible to select a column and update all rows for the selected column in OutSystems. 

  1. Create an Editable Table: Add an Editable Table to your screen or module, with the columns Col1, Col2, and Col3. Make sure the Table is bound to a List of Records, which represents the data source containing the rows and columns.

  2. Implement the Update Logic: In the action where you want to update the column values, write the necessary logic. You can use a For Each loop to iterate over each row in the List of Records.

  3. Select the Column and Update: Within the loop, use an If condition to check if the column being processed matches the selected column (in this case, Col3). If it does, update the value of Col3 for the current row. You can use the Assign action to update the value.

  4. Save the Changes: After updating the desired column values, make sure to save the changes to the List of Records. You can use the Update action or the Assign action to modify the specific column value in the List.

  5. Display the Updated Data: If you want to display the updated data, bind the List of Records to the Editable Table or any other widget where you want to present the data. The updated values will be reflected in the UI.


Hope this helps

Thanks


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