Request from network admin that I can’t seem to wrap head around if even possible.
Have table with 5 columns: Issue (btn), Name, Password, Note, Send Email (btn)
Request is to remove issue column and instead have btn in Password column only if password data -eq “Not Set”.
Current Table code
New-UDCard -Title 'Account Table' -Content {
$Columns = @(
New-UDTableColumn -Property Issue -Title Issue -Sort $false -Render {
New-UDButton -Id "btn$($EventData)" -Text "Issue" -OnClick {
Show-UDToast -Message "Issuing password for $($EventData.name) requested by $user" -Duration 4000 -Position center -ID 'Executing'
$Credentials = Invoke-UAScript -Script $SetScript -Identity $EventData.name -User $User -Wait
Show-UDToast -Message "Password issued for $($EventData.name). Use Send Email to receive email to forward to desired guest.
" -Duration 4000 -Position center
Sync-UDElement -Id 'AccountTable'
}
}
New-UDTableColumn -Property Name -Title "Account" -Sort $True
New-UDTableColumn -Property idautoPersonDefaultPassword -Title "Password" -Sort $True
New-UDTableColumn -Property info -Title "Note(s)" -Sort $True
New-UDTableColumn -Property Email -Title Email -Sort $false -Render {
New-UDButton -Id "btn$($EventData)" -Text "Send Email" -OnClick {
Show-UDToast -Message "Sending Email"-Duration 4000 -Position center
Invoke-UAScript -Script $SendSabersEvent -Identity $User -TenantID $365TenantID -AppID $TechNoticeAppID -AppSecret $TechNoticeAppSecret -SEAccount $EventData.Name
}
}
)
New-UDTable -Id 'Table' -Data $FilteredData -Columns $Columns -ShowSort
} -Elevation 2
}
Product: PowerShell Universal
Version: 2.8.2