NewFieldNames (Change Field Name)

The NewFieldsNames instruction is used to change the fieldname of one or more generic variables in a data table during run-time.

Syntax

NewFieldNames ( GenericName, NewNames )

Remarks

When using the NewFieldNames instruction, a variable array is given a generic name. Whenever the NewFieldNames instruction is executed, the next available generic variable in a data table is assigned a new name from the NewNames string.

This instruction accommodates smart sensors that return a unique name as part of a data string (where the unique name can be parsed out of the string and used for the NewName) or the addition of a Campbell Scientific wireless sensor into an existing wireless sensor network.

NOTE: When a NewName is assigned to a generic variable, the table definitions in the datalogger will change. Thus, any operation that relies on datalogger table definitions is affected. For example, if scheduled data collection is taking place, when the generic variable name is changed a backup file is created for the existing *.dat file and a new file, with the new header information, is written.

Only one NewFieldNames instruction is allowed in a program.

GenericName (Generic Name)

The name for the variable array assigned to the generic variable(s).

Type: Variable array

NewNames (New Names)

A string that will be used to populate the generic variable field names when the NewFieldNames instruction is run. Multiple names in a list should be separated with commas.

Type: String (list of comma-separated names)