Hyperlinks in UDTables

Is it possible to make items in a UDTable clickable? For example, I’d like to make the ‘Name’ column in the following picture take me to a new UD Page when clicked:

I have a feeling this can be done with UDElements, but I can’t find much in the way of documentation for these

Thanks in advance

Nevermind, I found this:

New-UDLink can do this:

New-UDTable -Title "Server Information" -Headers @("Severity", "Name",'Affected Hosts') -Endpoint {
    1..10 | foreach {
      [pscustomobject]@{
        Severity = 'CRITICAL'
        Name = New-UDLink -Text 'KB123456' -Url "localhost\kb123456"
        'Affected Hosts' = '123'
      }
    }| Out-UDTableData -Property @("Severity", "Name",'Affected Hosts')
  }
1 Like

I like that a lot better, actually, thanks @psott

Would it be possible to have those links open a new card or other element instead? I’d like users to click on a user or mailbox in table and pull up a window where they can edit details without jumping to another page

Should be possible. I have no computer right now to test it, but this thread should help:

Here is a working example of a modal popup inside a grid

Get-UDDashboard | Stop-UDDashboard

$pages = @()

$pages += New-UDPage -Name "home" -Content {
  New-UDTable -Title "Information" -Headers @("Name", "Action") -Endpoint {
    1..10 | foreach {
      [pscustomobject]@{
        Name = 'something'
        Action = New-UDButton -Text "Click" -OnClick  {
          Show-UDModal -Header {New-UDHeading -Size 4 -Text 'Modal Heading'} -Content {
            New-UDCard -Title 'Modal Title' -Size large -Content {
              "content of card $_"
            }
          }
        }
      }
    } | Out-UDTableData -Property @("Name", "Action")
  }
}

$Dashboard = New-UDDashboard -Title 'test' -Page $pages
Start-UDDashboard -Port 10001 -Dashboard $Dashboard
2 Likes