Add-FLCItem

Creates a new Item in the specified workspace in Fusion Lifecycle.

Add-FLCItem -Workspace <String> [[-Properties] <Hashtable>] [<CommonParameters>]

Type Name Description Optional
StringWorkspaceThe name of the workspace where the item should be added tono
HashtablePropertiesThe properties for the item being created, which will be set for the according fields in Fusion Lifecycleyes

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

The -Properties arguments allows passing the name and value for all the Fields which should be set when creating the Item.
For those Fields which are not present in the Hashtable the value is set to a default value configured in Fusion Lifecycle.

Only Fields which where assigned either to a Section or to a Matrix in the Item Details Form in Fusion Lifecycle can be passed.
Addionally they must have one of the following Field types:

  • Integer
  • Float
  • Money
  • Date
  • Single Line Text
  • Paragraph
  • Paragraph w/o Line Breaks
  • Check Box
  • Image
  • Email
  • BOM UOM Pick List
  • Defined Pick List - Single Selection
  • Defined Pick List - Multiple Selection

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:

Create a new Item

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

Add-FLCItem -Workspace 'Training'

<#
Id                      : 9009
Workspace               : Training
Number                  : TRN000003
Document Number         :
Trainee Name            :
Job Title               :
Primary Trainer         :
Training Start          :
Training End            :
Qualification Completed :
Comments                :
#>

Create an Item with properties

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

$item = Add-FLCItem -Workspace 'Items and BOMs' -Properties @{
         "Description" = "vault FLC is fun!"       #Field Type: Single Line Text
         "Date Performed" = (Get-Date)             #Field Type: Date
         "ISO 9001" = $true                        #Field Type: Check Box
         "Average Cost"  = 9000.5                  #Field Type: Money         
}

Create an Item with Pick List fields

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

$item = Add-FLCItem -Workspace 'Audits' -Properties @{
         "Unit of Measure" = "Cubic Centimeter"                  #Field Type: BOM UOM Pick List
         "SPC Score" = "3 - Advanced"                            #Field Type: Defined Pick List - Single Selection
         "Audit Team" = @("Thomsen, Dane", "Bernat, Lauran")     #Field Type: Defined Pick List - Multiple Selection
}

Create an Item with Paragraph and Image fields

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

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

$item = Add-FLCItem -Workspace 'FMEA Analysis' -Properties @{
        "Type of FMEA required" = "System FMEA"               #Field Type: Defined Pick List - Single Selection
        "Request Date" = (Get-Date)                           #Field Type: Date
        "Request Notes" = "<p><b>Renewe next time!<b></p>"    #Field Type: Paragraph
        "Process or Product Image" = $imageBytes              #Field Type: Image
}

Error handling, analyze why Item could not be created using $Error

Connect-FLC -Tenant 'your_tenant_name' -ClientId 'your_client_id' -ClientSecret 'your_client_secret' -UserId 'your_email@example.com'
$item = Add-FLCItem -Workspace 'Not existing Workspace'

if(-not $item){
   $Error[0].Exception #Returns "No Workspace found with the given name: Not existing Workspace"
}