Example: `SelectionCondition` Multiple `TableControl` Need One Default TableRowEntry
Example
(Write-FormatTableView -Property Name,ComputerName -Width 70,25 -ViewCondition { if($_.ComputerName) { $true } } -ViewTypeName compName ) + (Write-FormatTableView -Property Name -Width 70 ) | Write-FormatView -FormatXML { $_ } -TypeName 'Utility.InstalledSoftware' | Out-FormatData | Set-Content t.format.ps1xml
Links
I'm looking at this doc. I can't quite figure out how to use the -ViewCondition. I want to display ComputerName when I have the data and hide it when I don't have the data.
I'm thinking now I need to do independent Write-FormatView with each Write-FormatTableView and then pipe into Out-FormatData.
@mattcargile yeah, selection conditions are both overpowered and not ideally exposed yet (I've only come to realize just how overpowered they are fairly recently)
See #220
Open to thoughts on the ideal command format here.
I want to display
ComputerNamewhen I have the data and hide it when I don't have the data.
With table formatting, this will be a little bit trickier.
Table formatting conditions require the same number of columns to exist in each possible condition.
As far as how to use the current implementation... you can pipe multiple objects with a -ViewCondition in, provided as least one has no view condition.
I want to display
ComputerNamewhen I have the data and hide it when I don't have the data.With table formatting, this will be a little bit trickier.
Table formatting conditions require the same number of columns to exist in each possible condition.
As far as how to use the current implementation... you can pipe multiple objects with a -ViewCondition in, provided as least one has no view condition.
I'm seeing that now after creating a multi TableRowEntry . I'll have to do what get-process -includeusername does and create another type unfortunately like MyType.Type#ComputerName in pstypenames or the like.