Zoomed Image

AMSX Scripting Language - Command : addcustomfield

Summary

Add a custom specification field to a table if it does not already exist

Description

Creates a new specification (custom) field, skipping creation if a field with that name already exists. You can optionally copy the category structure from another existing field by name or ID, and force a specific SpecificationID rather than auto-generating one.

Parameters

ParameterDescription
cmdName of the specification field to add
Argument 0Table name the field belongs to (defaults to the Asset table if blank)
Argument 1SpecificationTypeID for the new field (controls the field data type)
Argument 2SpecificationID or SpecificationXMLName of an existing field whose categories should be copied to this new field
Argument 3Force a specific SpecificationID for the new field instead of generating a new one

Syntax


AddCustomField "Name of the specification field to add", "Table name the field belongs to (defaults to the Asset table if blank)", "SpecificationTypeID for the new field (controls the field data type)", "SpecificationID or SpecificationXMLName of an existing field whose categories should be copied to this new field", "Force a specific SpecificationID for the new field instead of generating a new one"

Return to the AMSX Command Reference