- Knowledge base
- powerGate
- Troubleshooting
BOM Window: BomRows remain in state Unknown after an operation
Issue
When executing an operation like "Check" or Transfer" BOM on the powerGate BOM Window some bomRows remain in state "Unknown"
Cause
This issue happens when accessing the BOM object in the PowerShell function
Solution
This issue can be avoided by saving the BOM object in a different variable and using that in the BOM window operations:
function Check-Boms($boms) {
# Workaround
$myBom = $boms | Sort-Object {[int]$_.Bom_PositionNumber}
foreach($bom in $myBom) {
$bom | Update-BomWindowEntity -Status 'Identical'
foreach ($bomRow in $bom.Children) {
$bomRow | Update-BomWindowEntity -Status 'Identical'
}
$myHeader = $myBom | Where-Object { $_.Bom_Number -eq "Part" }
}
}