Skip to main content

CreateEquipmentFromTemplate

Structure

CreateEquipmentFromTemplate(sTemplate, sNewCompany, sNewGageSN, sNewGageID: String; iQuantity: Integer; sDefaultCalType: String; bGetFirstUnusedValue, bDoNotCopyCharges, bDoNotCopyAttributesValues: Boolean): String:

Type

Function

Description

This event function does the same operation as the 'Add New Equipment From Template...' menu option from above the 'Choose Equipment' grid in an event. The parameters required mirror the options available in the event dialog. Equipment created by this function are automatically added into the Choose Equipment grid in the event.

Parameters: 8

| Parameter | Type | Description
| sTemplate | String | Template to be used to create asset(s)sNewCompany | String | Company for the new equipment createdsNewGageSN | String | I.D. for the new equipment createdsNewGageID | String | Serial Number for the new equipment created (optional)iQuantity | Integer | Number of assets to be created. The default is 1 (value cannot be 0, must be at least 1.) If more than 1, then the autonumber scheme is used to create sNewID values. The autonumber scheme is found on the template level.sDefaultCalType | String | Default cal. type to be set for the new equipment.bGetFirstUnusedValue | Boolean | Get First Unused Value if AutoNumber scheme is used.bDoNotCopyCharges | Boolean | Do not copy charges from template to equipment.bDoNotCopyAttributesValues | Boolean | Do not copy attributes values from template to equipment. |

Return Value

Text. The text will be blank if no errors occurred. If any errors occurred, they will be logged one-error-per-line in the text results. |