I am creating a table in PSU to get messages out of the Exchange online Quarantine which is all working fine but some of the columns contain very long strings which aren’t important but I would like to include them in the export.
So in the web portal I would like Sender, recipient subject etc. but in the export I would still like to have message-id, Identity, expiry date and other details.
I have tried setting the column Width to 0 and the truncate switch
New-UDElement -tag 'div' -id 'QuarantinePage' -Content {
$columns = @(
New-UDTableColumn -Title 'ReceivedTime' -Property 'ReceivedTime' -IncludeInSearch -IncludeInExport
New-UDTableColumn -Title 'SenderAddress' -Property 'SenderAddress' -IncludeInSearch -IncludeInExport
New-UDTableColumn -Title 'RecipientAddress' -Property 'RecipientAddress' -IncludeInSearch -IncludeInExport
New-UDTableColumn -Title 'Subject' -Property 'Subject' -IncludeInSearch -IncludeInExport
New-UDTableColumn -Title 'Size' -Property 'Size' -IncludeInSearch -IncludeInExport
New-UDTableColumn -Title 'Type' -Property 'Type' -IncludeInSearch -IncludeInExport
New-UDTableColumn -Title 'ReleaseStatus' -Property 'ReleaseStatus' -IncludeInSearch -IncludeInExport
New-UDTableColumn -Title 'MessageId' -Property 'MessageId' -IncludeInSearch -IncludeInExport -Width 0 -Truncate
New-UDTableColumn -Title 'GetHeaders' -Property 'GetHeaders' -Render {
New-UDButton -Text 'GetHeaders' -id "btnHeader" -OnClick {
$headers = $eventdata.MessageHeader
Set-UDElement -Id 'QuarantinePage' -Content {
New-UDPaper -Children {
New-UDHtml -Markup ($headers -replace "`r`n", '<br>')
}
New-UDButton -Text 'Back' -OnClick {
Set-UDElement -Id 'QuarantinePage' -Content {
New-UDTable -Data $CustomTable -Id 'QuarantinedMessages' -Title 'Quarantined Messages' -Columns $columns -ShowSort -ShowFilter -ShowPagination -ShowSelection -Export -ShowSearch
}
}
}
}
}
New-UDTableColumn -Title 'GetPreview' -Property 'GetPreview' -Render {
New-UDButton -Text 'GetPreview' -id "btnPreview" -OnClick {
$Body = $eventdata.MessagePreview
Set-UDElement -Id 'QuarantinePage' -Content {
New-UDPaper -Children {
New-UDHtml -Markup ($Body -replace "`r`n", '<br>')
}
New-UDButton -Text 'Back' -OnClick {
Set-UDElement -Id 'QuarantinePage' -Content {
New-UDTable -Data $CustomTable -Id 'QuarantinedMessages' -Title 'Quarantined Messages' -Columns $columns -ShowSort -ShowFilter -ShowPagination -ShowSelection -Export -ShowSearch
}
}
}
}
}
)
New-UDTable -Data $CustomTable -Id 'QuarantinedMessages' -Title 'Quarantined Messages' -Columns $columns -ShowSort -ShowFilter -ShowPagination -ShowSelection -Export -ShowSearch
}
Product: PowerShell Universal
Version: 2.1.1