auto_stories Bilgi Bankası chevron_right Actions chevron_right Makale

Update Row in List

The "Update Row in List" action ensures that only certain rows are updated without updating all the
records in the corresponding list. This preserves the existing filtering and appearance in other rows of
the list and lists that work with nested structures such as treeList, and only the update operation is
performed on the target row."

blobid0.png

The SQL query used in the data source of the relevant list should be written in the SQL Query
field in the action in exactly the same way. In addition, the ID of that row must be used in the WHERE
condition of the query so that only the row or rows to be updated can be targeted. That is, whichever
row(s) are to be updated, the ID values of these rows must be explicitly specified in the WHERE
condition.

 

Example Used : 

SELECT 
  UserTableID,
  MachineCode,
  MachineName,
  RelevantPersonnel
FROM
  dbo.MachineMaintenance WITH (NOLOCK)
WHERE UserTableID='$PListID$'

A form has been created in which information about machine maintenance is entered, and a list has
been created at the bottom of the form that lists the information entered. By clicking on the list line,
the data of the relevant record is automatically transferred to the form fields. After the desired
change is made, the Update Button is clicked

blobid0.png

It is not recommended to add an Update Row in List action along with the Save action to a
button under the form , because the Save action saves the entire form and reloads all the rows in
the list. This results in poor performance, especially for lists that contain a lot of data. However, the
purpose of the Update Row in List action is to ensure that only the changed row is updated in the list.

hese actions can be added to any element suitable for the need, without being limited to only one
button for the process of updating the relevant record. In the example, it is shown via the button.
First, an Update Value or SQL query is run that updates only the target record, and then the Update
Row in List action refreshes only that row in the list. Thus, instead of reloading the entire list, only the
changed row is updated and the performance of the application is maintained.