API Reference
Command
New-HtmlXTableCondition
Creates a conditional formatting rule for a table.
Remarks
Use inside New-HtmlXTable { }.
Examples
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
- Background color when the condition matches.
- CaseSensitive SwitchParameter
- Use case sensitive comparisons for string operators.
- Color string
- Text color when the condition matches.
- DateTimeFormat string
- Date format used when parsing string dates.
- FailBackgroundColor string
- Background color when the condition fails.
- FailColor string
- Text color when the condition fails.
- HighlightHeaders string[]
- Explicit headers to highlight instead of the condition column.
- HighlightParent SwitchParameter
- When highlighting cells, also apply styling to the parent element.
- Name string
- Column header name the condition targets.
- Operator TableConditionOperator
- 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
- Invert the condition (logical NOT).
- Row SwitchParameter
- Apply formatting to the entire row.
- Type TableConditionType
- Condition data type. Possible values: String, Number, Bool, Date
- Possible values:
String,Number,Bool,Date - Value object
- Primary comparison value.
- ValueTo object
- Secondary comparison value used for ranges.
Outputs
HtmlForgeX.DslOptions.Tables.TableConditionOption