VS:NewField
Jump to navigation
Jump to search
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Creates a new field in a specified record format. If the record does not exist, a new one is created using the specified record name.
Please refer to the VectorScript Appendix for specific field data types and formatting.
PROCEDURE NewField(
recName :STRING;
fieldName :STRING;
fieldValue :DYNARRAY[] of CHAR;
fType :INTEGER;
fFlag :INTEGER);
def vs.NewField(recName, fieldName, fieldValue, fType, fFlag): return None
Parameters
recName STRING Name of record to which field will be added. fieldName STRING Name of new field. fieldValue DYNARRAY[] of CHAR Default value for new field. fType INTEGER Data type of new field. fFlag INTEGER Display style of field.
Remarks
If the fieldName argument is longer than 20 characters, it will be truncated to 20 characters, without warning. The recName argument can be up to something like 60 characters (I think).
Example
VectorScript
NewField('Part Info','Serial No.','A-0000',4,0);
Python
Version
Availability: from All Versions