Deludge script to modify all records in database

Deludge script to modify all records in database

Hi,

I have added a new field to an existing database and need to populate it based on the value in another field in the same database.  New records aren't a problem, but I'm not sure how to run it on all the previous records that already exist.  

Specifically, I have a new 'Grade' text field (that is empty in the existing records) and an existing 'Standards' text field.  I want to loop through all existing records and extract the portion of the 'Standards' field that precedes the '.':

Example: 'Standards' field entry:  "10.2.1 - Compare the major ....."  From this I need to extract the '10' and enter it into the same record's new 'Grade' field.

The string function isn't the issue - it's knowing how to loop through existing records in the database and make these changes - this would, of course, only need to be run one time.  The Bulk Edit feature in the report would simply insert the same value in all records - not my goal.

Thanks for your help.