Product: PowerShell Universal
Version: 3.3.7
In my dashboad i generate a GUID
$session:ApplicationRequestGUID = [guid]::NewGuid()
$ApplicationRequest = New-Object –TypeName PSObject –Prop ([ordered]@{
guid = $session:ApplicationRequestGUID
ApplicationName = $Session:ApplicationtoManage.ApplicationName
})
$Session:InvokeResult = Invoke-PSUScript -name 'SubmitApplicationRequest.ps1' -integrated -ApplicationRequest $ApplicationRequest
$LogPath = 'C:\temp\logs\ApplicationRequest\'
$LogFileName = "$($ApplicationRequest.guid).log"
$LogFullFileName = $LogPath + $LogFileName
New-UDCard -id 'Bob' -Content {
New-UDDynamic -Content {
$Session:ResultfileContent = get-content -path $LogFullFileName -ErrorAction SilentlyContinue
if ($Session:ResultfileContent)
{
New-UDAlert -Text "$(get-Date)"
New-UDAlert -Text " GUID:$session:ApplicationRequestGUID"
New-UDAlert -Text "Job Started!"
foreach ($Session:Line in $Session:ResultfileContent )
{
New-UDAlert -Text "$Session:Line"
}
}
else
{
New-UDAlert -Text "$(get-Date)"
New-UDAlert -Text "Waiting for job to start"
}
} -AutoRefresh -AutoRefreshInterval 5
}
The problem is if I have multiple tabs open the GUID last generated is use by all tabs in my browser on refresh of the ud dynamic element
i.e.
Tab1 = page is loaded with a GUID of 1 and the guid is displayed in a uddynamic element with auto refresh
Tab2 is opened and loads with a GUID of 2
Tab 1 is refreshed and uddynamic element updates with a GUID of 2
I have tried
New-UDDynamic -id “GUID:$session:ApplicationRequestGUID”
but that makes no difference.
What am i doing wrong?