Hey folks,
I’m trying to use UD to help us decommission a bunch of devices, by scanning their asset tag. I’d like to refocus on the text field it gets input, but I’m unable to make this work. Here’s the relevant section of code:
New-UDInput -Id ENTRY -Title "Asset Retirement" -Endpoint {
param(
[ValidatePattern('[Aa]\d{6}')]
$AssetID)
$Session:Asset = Get-WHDAsset -QualifierString "(assetNumber caseInsensitiveLike '$AssetID')"
$Session:Asset = Get-WHDAsset -AssetId $Session:Asset.id
$Session:Asset | Add-Member -NotePropertyName "Processed" -NotePropertyValue "False"
$NewAssetList = @()
$Cache:AssetList | ForEach-Object {
$NewAssetList = $NewAssetList + $_
}
$NewAssetList = $NewAssetList + $Session:Asset
$Cache:AssetList = $NewAssetList
New-UDInputAction -ClearInput
New-UDInputAction -Content{
Select-UDElement -ID 'ENTRY'
}
}
I’ve tried variations of the New-UDInputAction block. “-ClearInput -Content {}” doesn’t seem to do either, and separate, just clears input. The previous thread I could find on this indicates that maybe this isn’t implemented yet - if so, is there a different way I can go about this?