The table is created with a rendered column with html which is displayed as expected. When the data is exported the fields that have the html are blank. If I remove the html the export shows the missing fields. I didn’t expect this to be an issue. Is there a workaround?
New-UDTableColumn -Property Name -Title "Group Name" -IncludeInExport -IncludeInSearch -Render {
If($EventData.Azure){
New-UDHtml "<span style=`"text-decoration: underline;`"><strong>$($EventData.Name)</strong></span>"
}
else { $EventData.Name }
}
Product: PowerShell Universal
Version: 2.0.3
adam
June 15, 2021, 8:54pm
2
This should be improved but if you use the -OnExport parameter, you can just return the data as is.
$Data = @(
@{Dessert = 'Frozen yoghurt'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0}
@{Dessert = 'Ice cream sandwich'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0}
@{Dessert = 'Eclair'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0}
@{Dessert = 'Cupcake'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0}
@{Dessert = 'Gingerbread'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0}
)
New-UDTable -Title 'Shows' -Data $Data -Columns @(
New-UDTableColumn -Property 'Dessert' -Sort -Filter
New-UDTableColumn -Property 'Calories' -Sort -Filter -Render { "0" }
) -Sort -Filter -Export -OnExport {
$Data
}
The New-UDTable command I am trying is below. I have a feeling the syntax is wrong. When I attempt to export nothing downloads and no errors in the dashboard log to indicate what the problem might be.
New-UDTable -Data $UpdGroups -Id 'GroupTable' -Title "Group Membership for $($adUser.Name)" -Columns $Columns -ShowPagination -ShowExport -ShowSearch -ShowFilter -ShowSort -Dense -PageSize 10 -OnExport {$UpdGroups}
adam
June 16, 2021, 12:23pm
4
Can you open the web browsers dev tools to see if there are any errors in there? Typically F12
No idea what I’m looking at but here it is.
adam
June 16, 2021, 3:28pm
6
Thanks. That’s help. I can take a peek at the source in those locations to see if we can get some hints.