Update-VaultChangeOrder

Edits a Change Order in Vault and manipulates its associations.

Syntax

Update-VaultChangeOrder -Number <String> [-DueDate <DateTime>] [-Title <String>] [-Description <String>] [-Properties <Hashtable>] [-AddItemRecords <String[]>] [-ItemRecords <String[]>] [-RemoveItemRecords <String[]>] [-AddAttachments <String[]>] [-Attachments <String[]>] [-RemoveAttachments <String[]>] [<CommonParameters>]

Return type

ChangeOrder ← on success
empty ← on failure

Parameters

Type

Name

Description

Optional

String

Number

Number of the Change Order that should be edited

no

DateTime

DueDate

New date and time by which the Change Order must be approved.

yes

String

Title

The new title of the Change Order

yes

String

Description

The new description of the Change Order

yes

Hashtable

Properties

The user-defined properties and their values which should be updated on the Change Order

yes

String[]

AddItemRecords

Vault items - identified by their Number - that should be associated as new Item Records of the Change Order

yes

String[]

ItemRecords

Vault items - identified by their Number - that will replace the existing Item Records of the Change Order

yes

String[]

RemoveItemRecords

Vault items - identified by their Number - which should be removed from the Item Records of the Change Order

yes

String[]

AddAttachments

Full paths to the Vault files that should be attached to the Change Order

yes

String[]

Attachments

Full paths to the Vault files that will replace the existing attachments of the Change Order

yes

String[]

RemoveAttachments

Full paths to the Vault files which should be detached from the Change Order

yes

Remarks

In order to update properties of a Change Order the -Properties argument allows editing the values of used-defined properties which can be passed using their display names.

The -AddItemRecords parameter can be used to add Vault items to a Change Order by passing an array of Vault item numbers.
All the existing Item Records that are part of the change management process can even be replaced using the -ItemRecords parameter and individual Vault item associations can be removed again using the -RemoveItemRecords parameter.

Vault files can be attached to a Change Order using the -AddAttachments parameter, by passing an array of Vault file paths.
In the same way, all the existing attachment associations can be replaced using the -Attachments parameter or individual Vault files can be detached using -RemoveAttachments.
When some of the attachments are checked-out, then powerVault will attach the previous file version of them.

Examples

Edit the details of a previously created Change Order:

$changeOrder = Add-VaultChangeOrder -Number "ECO-000110"

$changeOrderWithUpdatedDetails = Update-VaultChangeOrder -Number $changeOrder._Number `
	-DueDate (Get-Date).AddDays(10) `
	-Title "High Welding Frame adaption" `
	-Description "Please copy this design to create a new High Welding Frame.`r`nH = 2100mm`r`nW = 600mm `r`nD = 600mm" `
	-Properties @{'Test'= 6.66}

Assign Item Records to a Change Order:

$item = Get-VaultItem -Number '100001'
$allRelatedItemRecords = @($item) + (Get-VaultItemBOM -Number $item.Number)

$changeOrder = Update-VaultChangeOrder -Number 'ECO-0000022' -ItemRecords ($allRelatedItemRecords | Select-Object -ExpandProperty Number)
$changeOrder.'Number of Items'  #Returns the amount of assigned Item Records

Attach a Markup file to a Change Order

$changeOrder = Update-VaultChangeOrder -Number 'ECO-000138' -AddAttachments @('$/ECO Markup DWF/ECO-000138 Markup coolOrange.dwf')

$changeOrder._HasAttachments #Returns True
$changeOrder.'Number of File Attachments' #Returns the amount of attached files