Build: v5.7.172
OS: Windows 7 Professional (64 Bit)
Build: v6.1.7601.65536
Hi,
I'm trying to use the UpdateScript section of the templated Start-Job button. However, when I receive the job (within the UpdateScipt section) it flashes up a "searching for available modules" dialog - and it does this for each "refresh", creating a moving cascade of dialog boxes.
- UpdateScript = {
- Param ([System.Management.Automation.Job]$Job)
- $results = Receive-Job -Job $Job -Keep
- #Animate the Button
It never seems to flash up one of these dialogs in the CompletedScript section when receiving the same job.
However, if the -keep parameter is removed, the dialog only appears on the first pass of UpdateScript - even if the job "HasMoreData" on subsequent refreshes. Again, it never seems to appear on CompletedScript.
I can recreate the problem by
- Creating a new Forms project
- Adding a start-job button
- uncommenting the Receive-Job command in the UpdateScript section
Best regards,