Functions/Data/New-HTMLCellLogic.ps1
Function New-HTMLCellLogic { [CmdletBinding()] Param ( # Name of Field (column) to apply Rule on [Parameter(Mandatory=$true)] $FieldName, # Type of Logic Rule [Parameter(Mandatory=$true)] [ValidateSet("LIKE","NOTLIKE","IN","EQ","NE","BT","BT-LE","BT-GE","BT-BE","GT","GE","LT","LE")] [String] $Type, # Baseline value to evaluate against [Parameter(Mandatory=$true)] [AllowEmptyString()] [AllowNull()] $Value, # Class to Apply to cell [Parameter(Mandatory=$false)] [ValidateSet("normal","degraded","excessive","red","orange","yellow","green","turquoise","teal","blue","purple","magenta","brown")] [string[]] $Classes = ("statcell"), # Additional Style to Apply to cell [Parameter(Mandatory=$false)] [string[]] $Style, # Flag to Remove the text or value inside the cell upon presentation (pretty niche use case) [Parameter(Mandatory=$false)] [boolean] $StripVal = $false ) [pscustomobject]([ordered]@{ FieldName = $FieldName Type = $Type Value = $Value Classes = $Classes Style = $Style StripVal = $StripVal }) } |