When working with the powerFLC Cmdlets sometimes they fail with errors that are hard to understand. This article describes common errors when creating or updating items in Fusion Lifecycle using Add-FLCItem or Update-FLCItem.

UOM configured in a FLC Field type

When a UOM is configured in a Fusion Lifecycle Field and the UOM is passed to the Add-FLCItem or the Update-FLCItem Cmdlet it will fail with the following error:

errors.long: <FieldName> must be a valid number.

It is not needed to pass the UOM since it is configured in Fusion Lifecycle for a specific Field. To create or update an item you can pass only the Value:

$item = Add-FLCItem -Workspace "Items and BOMs" -Properties @{
    "Number" = "20"

Update-FLCItem fails if the workspace contains a Field of type Workspace picklist

When trying to update an item that contains a workspace picklist the update fails even if the workspace picklist field is not updated. The following error message is thrown:

Value '' is not valid for Pick List CUSTOM_LOOKUP_WS_SUPPLIER

This issue was fixed in powerFLC v21.1.5. Update to at least that version to fix the issue.

If you are not able to update to this version you can also pass the value of the workspace picklist field as string:

$item = Update-FLCItem -Workspace "Products" -ItemId = $item.Id -Properties @{
    "Picklist" = "CNC Router"