Last active
July 15, 2025 12:11
-
-
Save slydlake/750877352655b5b0ece960fa5b5970de to your computer and use it in GitHub Desktop.
[VDS Eigenschaft auf NULL prüfen] #powershell #VDS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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