Add a number to a field - update as a group
I have a table with a year field containing
7, 8, 9, 10, 11, 12
I need to rollover these numbers at the end of the year and add 1
so they would become
8, 9, 10, 11, 12, 13
Created a setfield script
Set Field [finance::year; finance::year +1]
Button is located on the layout page where the data is.
It works fine but only updates one record at a time. I need it to update all the records at once. Any advice would be appreciated.
Check out Replace Field Contents. There's a calculation option that will allow you to add one to a specified field for all records in the current found set.
Or, depending on the purpose of this table, you might just delete the oldest record (with 7) and create a new record with 13 in it.