Title: Feature Request: Add conditional colorization to Format-Table command · Issue #3886 · PowerShell/PowerShell · GitHub
Open Graph Title: Feature Request: Add conditional colorization to Format-Table command · Issue #3886 · PowerShell/PowerShell
X Title: Feature Request: Add conditional colorization to Format-Table command · Issue #3886 · PowerShell/PowerShell
Description: The Format-Table command in PowerShell displays objects in a fundamentally similar manner as Microsoft Excel spreadsheets. Microsoft Excel provides a conditional formatting feature that enables spreadsheet builders to change the display ...
Open Graph Description: The Format-Table command in PowerShell displays objects in a fundamentally similar manner as Microsoft Excel spreadsheets. Microsoft Excel provides a conditional formatting feature that enables spr...
X Description: The Format-Table command in PowerShell displays objects in a fundamentally similar manner as Microsoft Excel spreadsheets. Microsoft Excel provides a conditional formatting feature that enables spr...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3886
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature Request: Add conditional colorization to Format-Table command","articleBody":"The `Format-Table` command in PowerShell displays objects in a fundamentally similar manner as Microsoft Excel spreadsheets. Microsoft Excel provides a conditional formatting feature that enables spreadsheet builders to change the display format of a cell, based on the value of the cell's contents.\r\n\r\nIt would be really great if a PowerShell user could add conditional formatting rules to object properties, using the `Format-Table` command. That way, let's say you have an object with a `Status` property. That property could be emitted as `Green` if its value is `Success` or `Red` if the property value is `Failed`.\r\n\r\n```\r\nName Status\r\n---- ------\r\nStep 1 Failed (Red)\r\nStep 2 Success (Green)\r\n```\r\n\r\nFor example, you could add a custom property specifier in the `Format-Table` command as follows:\r\n\r\n```powershell\r\nGet-SomeObjects | Format-Table -Property Name, @{ Name = 'Status'; Color = 'Green'; Value = '^Success$' }\r\n```\r\n\r\nIn PowerShell today, we already have a similar syntax for building \"calculated properties.\" We could leverage a similar syntax to build colorized expressions in data tables. This capability would be useful to build PowerShell-based dashboards and presenting data in a more useful manner in the console.\r\n\r\nCheers,\r\nTrevor Sullivan","author":{"url":"https://github.com/pcgeek86","@type":"Person","name":"pcgeek86"},"datePublished":"2017-05-30T21:12:28Z","url":"https://github.com/PowerShell/PowerShell/issues/3886"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c65c2954-874e-1406-15a9-b13dcf3d215b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 815E:2EE229:18924C:229FBA:6AFD4FD9 |
| html-safe-nonce | 7b293c47fc509a935cabc102435f957a4d03439ea00441ece759de8e4913c36a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTVFOjJFRTIyOToxODkyNEM6MjI5RkJBOjZBRkQ0RkQ5IiwidmlzaXRvcl9pZCI6Ijc2NzUwMzU4NDMxMTA0NTczMDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f657eade569a61e84c6bc9e12c13f96abef5ea5651abf4141713041581285abc |
| hovercard-subject-tag | issue:232383669 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/3886/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ff1124810f7d2f7d21428ab7491308ac19cd241a42c2a6edcfb4dba906c0ab2e/PowerShell/PowerShell/issues/3886 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ff1124810f7d2f7d21428ab7491308ac19cd241a42c2a6edcfb4dba906c0ab2e/PowerShell/PowerShell/issues/3886 |
| og:image:alt | The Format-Table command in PowerShell displays objects in a fundamentally similar manner as Microsoft Excel spreadsheets. Microsoft Excel provides a conditional formatting feature that enables spr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pcgeek86 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width