HtmlForgeX

API Reference

Command

New-HtmlXTableCondition

Namespace HtmlForgeX.PowerShell
Outputs
HtmlForgeX.DslOptions.Tables.TableConditionOption

Creates a conditional formatting rule for a table.

Remarks

Use inside New-HtmlXTable { }.

Examples

Imported script example

New-HtmlXTableCondition -Name "Status" -Type String -Operator Eq -Value "Stopped" -BackgroundColor "MistyRose" -Color "DarkRed" -Row
        

New-HtmlXTableCondition -Name "Status" -Type String -Operator Eq -Value "Warning"
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-HtmlXTableCondition [-BackgroundColor <string>] [-CaseSensitive] [-Color <string>] [-DateTimeFormat <string>] [-FailBackgroundColor <string>] [-FailColor <string>] [-HighlightHeaders <string[]>] [-HighlightParent] [-Name <string>] [-Operator <Eq>] [-ReverseCondition] [-Row] [-Type <String|Number|Bool|Date>] [-Value <object>] [-ValueTo <object>] [<CommonParameters>]
#

Parameters

BackgroundColor string optionalposition: namedpipeline: false
Background color when the condition matches.
CaseSensitive SwitchParameter optionalposition: namedpipeline: false
Use case sensitive comparisons for string operators.
Color string optionalposition: namedpipeline: false
Text color when the condition matches.
DateTimeFormat string optionalposition: namedpipeline: false
Date format used when parsing string dates.
FailBackgroundColor string optionalposition: namedpipeline: false
Background color when the condition fails.
FailColor string optionalposition: namedpipeline: false
Text color when the condition fails.
HighlightHeaders string[] optionalposition: namedpipeline: false
Explicit headers to highlight instead of the condition column.
HighlightParent SwitchParameter optionalposition: namedpipeline: false
When highlighting cells, also apply styling to the parent element.
Name string optionalposition: namedpipeline: false
Column header name the condition targets.
Operator TableConditionOperator optionalposition: namedpipeline: falsevalues: 14
Comparison operator. Possible values: Eq, Ne, Gt, Ge, Lt, Le, Contains, NotContains, Like, NotLike, Between, BetweenInclusive, In, NotIn
Possible values: Eq, Ne, Gt, Ge, Lt, Le, Contains, NotContains, Like, NotLike, Between, BetweenInclusive, In, NotIn
ReverseCondition SwitchParameter optionalposition: namedpipeline: false
Invert the condition (logical NOT).
Row SwitchParameter optionalposition: namedpipeline: false
Apply formatting to the entire row.
Type TableConditionType optionalposition: namedpipeline: falsevalues: 4
Condition data type. Possible values: String, Number, Bool, Date
Possible values: String, Number, Bool, Date
Value object optionalposition: namedpipeline: false
Primary comparison value.
ValueTo object optionalposition: namedpipeline: false
Secondary comparison value used for ranges.

Outputs

HtmlForgeX.DslOptions.Tables.TableConditionOption