Increment

On the File tab, in the Edit Data group: Select  Fields | Increment to increment the field values in some or all of the records in a file.

For example, you can set a start value of A100 for the first record and an increment of 5. After executing the function, records will contain the values A100, A105, A110, etc.

You can also select Fields | Update to increment fields as part of a File Update.

File

Enter the name of the file you want to work with. Optionally define a filter to selectively control which records will be processed.

Skip records

To apply the function at increments other than one record, enter a value in Skip records.

Overwrite data

To overwrite existing data in the file, select Overwrite data. If this box is not selected, the function will only work on blank records.

Increment last numeric component

If the Increment last numeric setting is selected, the last (rightmost) numeric component of each Character field value is incremented, otherwise the first (leftmost) numeric component of each Character field value is incremented.

In a Character field, digits are treated as integers and a decimal point is treated as text. Thus a numerical value containing a decimal point may be treated as separate integer numbers on either side of the decimal point. The exact effect depends on the state of the Increment last numeric setting in the Options | System | Editor Options form.

Incrementing a Character field will produce different results depending on the setting.

For example:

If the Increment last numeric setting is selected (the default), "Item 1.1" is treated as the text "Item 1." followed by the number 1.

If the Increment last numeric check box is NOT selected, "Item 1.1" is treated as the text "Item ", the number 1, and the text ".1".

This may seem a little counter-intuitive at first but it comes down to the definition of a Character field, which is always assumed to have zero decimals. This assumption makes it impossible to use non-integer increments. It also explains why incrementing a number like 1.1 appears to add steps of 0.1 (because the second 1 is treated as an integer).

If you do need to increment a text label by a decimal number, for example labels in "Item 1.1" format, temporarily change the field to Numeric with one decimal, and then change the increment value to 0.1. Change it back to a Character field once you have finished editing the file.

Field Name

In the Field Name column, type the name of the field you want to increment.

Function

The functions available via the Fields Increment form allow you to perform several replicating, copying and blanking operations on one or more numeric or character fields, overwriting your original data.

Select INCREMENT, for example, to automatically enter all data in the From and To fields of a drillhole sample.

Function Description
INCREMENT Write an optional starting value to the first record and then apply a fixed increment to subsequent records.
REPLICATE or BLANK Fill all records of a field with a constant value or replace all cells of the selected field with blank..
COPY FROM Copy the value of the From Field to the next record of Field Name.

Start

If you do not want to start the increment with the value that is currently in the first record, type in a new value in the Start field. If you do not enter a start value here, the current value in the first record will be used. However, if the values in the start field and first record are both blank, no increment will be executed at all. Instead all records will be blanked.

Increment

Type in the Increment value. If you enter a decimal value, then the field must be numeric, with decimals defined for it.

Forms

Click the Forms button to select and open a saved form set, or if a form set has been loaded, save the current form set

Run

Finally, click Run to increment the field values.