UDTable column not rendered

@adam can you please help here :slight_smile:

I would like to add a UD component (e.g. UDLink) into a UDTable by using Name and Value.
In this scenario the -Render is not an option.

$Data = [PSCustomObject]@{
        ID = (New-Guid).Guid
        Name = "Test"
        Age = 4
        Link = (New-UDLink -Text Link -Url "www.google.com")
    }

    New-UDTable -Data $Data.PSObject.Properties -Columns @(
        New-UDTableColumn -Property Name -Title Name 
        New-UDTableColumn -Property Value -Title Value
    )

The page is not redurning any error, just leaving blank.

The Name and Value Table should look like this, but should also include the UDLink.

This currently isn’t supported but should be pretty easily to implement. Please open an issue.

1 Like

I’m sure that I’m misunderstanding, but have links in my tables without issues.

Edit: yeah missed the V3 tag.

New-UDTable -Title "Work Order Information" -Headers @(" ", " ") -Endpoint {

    $TableData =  @(

    [PSCustomObject]@{Name = "Work Order ID:";  Value = "$($ArgumentList.WorkOrder_ID)";        Sort = "1"}
    [PSCustomObject]@{Name = "Title:";          Value = "$($ArgumentList.Title)";               Sort = "2"}
    [PSCustomObject]@{Name = "Status:";         Value = "$($ArgumentList.StatusDescription)";   Sort = "3"}
    [PSCustomObject]@{Name = "Description:";    Value = New-UDHtml "<div>$($($ArgumentList.Description).Replace('`n', '<br/>'))";         Sort = "4"}
    [PSCustomObject]@{Name = "Partner:";        Value = "$($ArgumentList.PartnerNameFriendly)"; Sort = "5"}
    [PSCustomObject]@{Name = "Time Estimate:";  Value = "$($ArgumentList.TimeEstimate) Hours";  Sort = "6"}
    [PSCustomObject]@{Name = "Created Date:";   Value = "$($ArgumentList.Created)";             Sort = "7"}
    [PSCustomObject]@{Name = "Last Modified:";  Value = "$($ArgumentList.LastUpdated)";         Sort = "8"}
    [PSCustomObject]@{Name = "TicketURL:";      Value = New-UDLink -Text "$($ArgumentList.PartnerTicketURL)" -Url "$($ArgumentList.PartnerTicketURL)" -OpenInNewWindow; Sort = "9"}
    [PSCustomObject]@{Name = "Requester:";      Value = "$($ArgumentList.Requester)"; Sort = "10"}

    ).GetEnumerator()  

    $TableData | Sort-Object Sort | Out-UDTableData -Property @("Name", "Value")

} -ArgumentList @($ArgumentList)

“without issues” might be a stretch - I haven’t dealt with what happens if $($ArgumentList.PartnerTicketURL) is empty.

1 Like

GH issue has been created

1 Like