Hi.
I am trying to create a server script that increases the value within a field of a collection of the database for all of its rows when it is executed.
Eachvalue is an integer and I want the script to add a the same integer to each value.
For example,
Collection: Values:
Row: 1 Value: 100
Row: 2 Value: 200
Row: 3 Value: 50
Row 4 Value: 125
How can I add 125 to the value in each row and update de Collection?
I would like to update it to:
Row: 1 Value: 225
Row: 2 Value: 325
Row: 3 Value: 175
Row 4 Value: 250
So far I've used the Collection.updateObject command but it only allows me to update 1 row since it requires the row's id, how I can do this for all items in a database?
Thanks!