Skip to content

Commit

Permalink
Small improvement around naming of columns
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Jun 29, 2024
1 parent 3f9cb60 commit 932d530
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Public/Objects/Format-TransposeTable.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ function Format-TransposeTable {
[switch] $Legacy,

[Parameter(ParameterSetName = 'Pivot')]
[string] $Property
[string] $Property,

[Parameter(ParameterSetName = 'Pivot')]
[string] $Name = "Object "
)
begin {
$Object = [System.Collections.Generic.List[object]]::new()
Expand All @@ -98,7 +101,7 @@ function Format-TransposeTable {
}
} else {
for ($i = 0; $i -lt $Object.Count; $i++) {
$ListHeader.Add("Object $i")
$ListHeader.Add("$($Name)$i")
}
}
$CountOfProperties = $Object[0].GetEnumerator().Name.Count
Expand Down Expand Up @@ -130,7 +133,7 @@ function Format-TransposeTable {
}
} else {
for ($i = 0; $i -lt $Object.Count; $i++) {
$ListHeader.Add("Object $i")
$ListHeader.Add("$($Name)$i")
}
}
$CountOfProperties = $Object[0].PSObject.Properties.Name.Count
Expand Down

0 comments on commit 932d530

Please sign in to comment.