Update-FLCItem

Updates properties of an existing Item in Fusion Lifecycle.

Update-FLCItem -Workspace <String> -ItemId <Long> -Properties <Hashtable> [<CommonParameters>]

Update-FLCItem -InputObject <PSObject> -Properties <Hashtable> [<CommonParameters>]

Type Name Description Optional
StringWorkspaceThe name of the workspace that contains the Itemno (optional when InputObject is used)
LongItemIdThe ID of the Item to updateno (optional when InputObject is used)
ItemInputObjectThe Fusion Lifecycle Item that should be updated. The argument accepts pipeline inputno (optional when Workspace and ItemId are used)
HashtablePropertiesThe properties which should be edited. Will be set for the according fields in Fusion Lifecycleno

Item ← on success.
empty ← on failure. Exception/ErrorMessage can be accessed using $Error.

In order to update properties of existing Fusion Lifecycle Item the -Properties arguments allows passing the name and the new values of the Fields which should be updated.
For those Fields which are not present in the Hashtable the value in Fusion Lifecycle is kept untouched.

Additional information about the limitations and requirements of the possible Fields can be found here.

Maximum number of characters

When the passed value for a Field exceeds the in Fusion Lifecycle configured maximum length, the value gets trimmed to its maximum length.

To use the examples below a Fusion Lifecycle PLM demo Tenant is required:

Update properties of an existing Item

Connect-FLC -Tenant 'your_tenant_name' -ClientId 'your_client_id' -ClientSecret 'your_client_secret' -UserId 'your_email@example.com'

$item = (Get-FLCItems -Workspace 'Tasks' -Filter 'ITEM_DETAILS:TASK_ID=TK000059')[0]

$item | Update-FLCItem -Properties @{ "Notes" = "All certification documents are up to date"; "Reviewers Assigned" = @("Berry, Jan") }

<#
Id                 : 7615
Workspace          : Tasks
WorkflowState      : Open
Number             : TK000059
Type               : SIM CFD
Description        : Attach results summary of thermal CFD studies.
Phase Needed By    : Development
Owner              :
Completed By       :
Reviewers Assigned : {Berry, Jan}
Reviewed By        :
Notes              : All certification documents are up to date
Image              : {255, 216, 255, 224...}
Related Product    :
Orig Start Date    : 13.12.2014 00:00:00
Orig End Date      : 25.12.2014 00:00:00
Orig Duration      : 12
#>

Update Item fields of different types

Connect-FLC -Tenant 'your_tenant_name' -ClientId 'your_client_id' -ClientSecret 'your_client_secret' -UserId 'your_email@example.com'

$item = Update-FLCItem -Workspace 'Items and BOMs' -ItemId 6796 -Properties @{
   "Description" = $null                                   #Field Type: Single Line Text
   "Unit of Measure" = "Cubic Centimeter"                  #Field Type: BOM UOM Pick List
   "Average Cost"  = 9000.5                                #Field Type: Money
   "RoHS" = $true                                          #Field Type: Check Box
   "MPN_PREF1" = "Approved"                                #Field Type: Defined Pick List - Single Selection
}

Update Item fields of Image, Date and Paragraph types

Connect-FLC -Tenant 'your_tenant_name' -ClientId 'your_client_id' -ClientSecret 'your_client_secret' -UserId 'your_email@example.com'

$imageBytes = Get-Content -Path 'thumbnail.png' -Encoding Byte -Raw

$item = Update-FLCItem -Workspace 'FMEA Analysis' -ItemId 8798 -Properties @{
        "Type of FMEA required" = "Design FMEA"               #Field Type: Defined Pick List - Single Selection
        "Request Date" = (Get-Date)                           #Field Type: Date
        "Request Notes" = "<p><b>Updated paragraph!</b></p>"   #Field Type: Paragraph
        "Process or Product Image" = $imageBytes              #Field Type: Image
}

Error handling, analyze why updating Item Properties failed using $Error

Connect-FLC -Tenant 'your_tenant_name' -ClientId 'your_client_id' -ClientSecret 'your_client_secret' -UserId 'your_email@example.com'

$item = Update-FLCItem -Workspace 'Approval Lists' -ItemId 7679 -Properties @{
   "Applicable To" = ''
}

if(-not $item){
   $Error[0].Exception #Returns "error.selectanoption: You must select an option for Applicable To"
}