Skip to content

Instantly share code, notes, and snippets.

@slydlake
Last active July 15, 2025 12:11
Show Gist options
  • Save slydlake/750877352655b5b0ece960fa5b5970de to your computer and use it in GitHub Desktop.
Save slydlake/750877352655b5b0ece960fa5b5970de to your computer and use it in GitHub Desktop.
[VDS Eigenschaft auf NULL prüfen] #powershell #VDS
function Confirm-MandatoryProperty {
<#
.SYNOPSIS
Leere Eigenschaften werden außerhalb des Dynamic Grids nicht mit einem roten Rahmen angezeigt, obwohl es ein Pflichtfeld ist.
Die Funktion schreibt und leert die entsprechende Eigenschaft, da erst dann der rote Rahmen angezeigt wird.
#>
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string[]]$Property
)
foreach ($propname in $Property) {
if ([string]::IsNullOrEmpty(($Prop[$propname].Value))) {
$Prop[$propname].Value = "_"
$Prop[$propname].Value = $null
}
}
}
Set-Alias -Name "InitCideonInventorWindow" -Value "CUSTOMERInitCideonInventorWindow"
function CUSTOMERInitCideonInventorWindow {
# ... function from Cideon
Confirm-MandatoryProperty -Property @("Title", "Description")
# .. function from Cideon
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment